if (batchIssueDto != null) {
return new PreviousIssue()
.setKey(batchIssueDto.getKey())
- .setComponentPath(batchIssueDto.getComponentPath())
+ .setComponentKey(batchIssueDto.getComponentKey())
.setChecksum(batchIssueDto.getChecksum())
.setAssigneeLogin(batchIssueDto.getAssigneeLogin())
.setAssigneeFullname(batchIssueDto.getAssigneeName())
assertThat(batchIssueDto.getLine()).isEqualTo(200);
assertThat(batchIssueDto.getResolution()).isEqualTo(Issue.RESOLUTION_FALSE_POSITIVE);
assertThat(batchIssueDto.getStatus()).isEqualTo(Issue.STATUS_RESOLVED);
- assertThat(batchIssueDto.getComponentPath()).isEqualTo("src/main/java/Sample.java");
+ assertThat(batchIssueDto.getComponentKey()).isEqualTo("Sample.java");
assertThat(batchIssueDto.getChecksum()).isEqualTo("123456");
assertThat(batchIssueDto.getAssigneeLogin()).isEqualTo("john");
assertThat(batchIssueDto.getAssigneeName()).isEqualTo("John Doo");
assertThat(batchIssueDto.getLine()).isEqualTo(200);
assertThat(batchIssueDto.getResolution()).isEqualTo(Issue.RESOLUTION_FALSE_POSITIVE);
assertThat(batchIssueDto.getStatus()).isEqualTo(Issue.STATUS_RESOLVED);
- assertThat(batchIssueDto.getComponentPath()).isEqualTo("src/main/java/Sample.java");
+ assertThat(batchIssueDto.getComponentKey()).isEqualTo("Sample.java");
assertThat(batchIssueDto.getChecksum()).isEqualTo("123456");
assertThat(batchIssueDto.getAssigneeLogin()).isEqualTo("john");
assertThat(batchIssueDto.getAssigneeName()).isEqualTo("John Doo");
[
{
"key": "EFGH",
- "componentPath": "src/main/java/Action.java",
+ "componentKey": "Action.java",
"ruleKey": "AvoidCycle",
"ruleRepo": "squid",
"line": 200,
[
{
"key": "EFGH",
- "componentPath": "src/main/java/Action.java",
+ "componentKey": "Action.java",
"ruleKey": "AvoidCycle",
"ruleRepo": "squid",
"line": 200,
public class PreviousIssue {
private String key;
- private String componentPath;
+ private String componentKey;
private String ruleKey;
private String ruleRepo;
private Integer line;
return key;
}
- public PreviousIssue setComponentPath(@Nullable String path) {
- this.componentPath = path;
+ public PreviousIssue setComponentKey(@Nullable String key) {
+ this.componentKey = key;
return this;
}
- public String componentPath() {
- return componentPath;
+ public String componentKey() {
+ return componentKey;
}
public PreviousIssue setLine(Integer line) {
PreviousIssue issue1 = new PreviousIssue();
issue1.setKey("key1");
- issue1.setComponentPath("path");
+ issue1.setComponentKey("key");
issue1.setRuleKey("repokey", "rulekey");
issue1.setLine(2);
issue1.setMessage("message");
JSONAssert
.assertEquals(
- "[{\"key\": \"key1\", \"componentPath\": \"path\", \"ruleKey\": \"rulekey\", \"ruleRepo\": \"repokey\", \"line\": 2,\"message\": \"message\", \"severity\": \"severity\", \"resolution\": \"resolution\", \"status\": \"status\", \"checksum\": \"checksum\",\"assigneeLogin\": \"login\", \"assigneeFullname\": \"fullname\"},"
+ "[{\"key\": \"key1\", \"componentKey\": \"key\", \"ruleKey\": \"rulekey\", \"ruleRepo\": \"repokey\", \"line\": 2,\"message\": \"message\", \"severity\": \"severity\", \"resolution\": \"resolution\", \"status\": \"status\", \"checksum\": \"checksum\",\"assigneeLogin\": \"login\", \"assigneeFullname\": \"fullname\"},"
+
"{\"key\": \"key2\"}]",
out.getBuffer().toString(), true);
StringWriter out = new StringWriter();
PreviousIssueHelper helper = PreviousIssueHelper.create(out);
StringReader reader = new StringReader(
- "[{\"key\": \"key1\", \"componentPath\": \"path\", \"ruleKey\": \"rulekey\", \"ruleRepo\": \"repokey\", \"line\": 2,\"message\": \"message\", \"severity\": \"severity\", \"resolution\": \"resolution\", \"status\": \"status\", \"checksum\": \"checksum\",\"assigneeLogin\": \"login\", \"assigneeFullname\": \"fullname\"},"
+ "[{\"key\": \"key1\", \"componentKey\": \"key\", \"ruleKey\": \"rulekey\", \"ruleRepo\": \"repokey\", \"line\": 2,\"message\": \"message\", \"severity\": \"severity\", \"resolution\": \"resolution\", \"status\": \"status\", \"checksum\": \"checksum\",\"assigneeLogin\": \"login\", \"assigneeFullname\": \"fullname\"},"
+
"{\"key\": \"key2\"}]");
assertThat(iterator.hasNext()).isFalse();
assertThat(issue1.key()).isEqualTo("key1");
- assertThat(issue1.componentPath()).isEqualTo("path");
+ assertThat(issue1.componentKey()).isEqualTo("key");
assertThat(issue1.ruleRepo()).isEqualTo("repokey");
assertThat(issue1.ruleKey()).isEqualTo("rulekey");
assertThat(issue1.line()).isEqualTo(2);
private String checksum;
private String assigneeLogin;
private String assigneeName;
- private String componentPath;
+ private String componentKey;
private String ruleKey;
private String ruleRepo;
return this;
}
- public String getComponentPath() {
- return componentPath;
+ public String getComponentKey() {
+ return componentKey;
}
- public BatchIssueDto setComponentPath(String componentPath) {
- this.componentPath = componentPath;
+ public BatchIssueDto setComponentKey(String componentKey) {
+ this.componentKey = componentKey;
return this;
}
i.checksum as checksum,
r.plugin_rule_key as ruleKey,
r.plugin_name as ruleRepo,
- component.path as componentPath,
+ component.kee as componentKey,
i.assignee as assigneeLogin,
u.name as assigneeName
FROM issues i
- INNER JOIN (SELECT p.id,p.path FROM projects p WHERE p.module_uuid=#{uuid} OR p.uuid=#{uuid}) component ON component.id=i.component_id
+ INNER JOIN (SELECT p.id,p.kee FROM projects p WHERE p.module_uuid=#{uuid} OR p.uuid=#{uuid}) component ON component.id=i.component_id
INNER JOIN rules r ON r.id=i.rule_id
LEFT OUTER JOIN users u ON u.login=i.assignee
WHERE i.status <> 'CLOSED'
i.checksum as checksum,
r.plugin_rule_key as ruleKey,
r.plugin_name as ruleRepo,
- component.path as componentPath,
+ component.kee as componentKey,
i.assignee as assigneeLogin,
u.name as assigneeName
FROM issues i