assertThat(issue.componentKey()).isEqualTo("org.sonar.sample:Sample"); assertThat(issue.moduleUuid()).isEqualTo("BCDE"); assertThat(issue.moduleUuidPath()).isEqualTo("ABCD.BCDE."); assertThat(issue.projectKey()).isEqualTo("org.sonar.sample"); assertThat(issue.status()).isEqualTo(Issue.STATUS_CLOSED);
raw.setComponentKey(base.componentKey()); raw.setModuleUuid(base.moduleUuid()); raw.setModuleUuidPath(base.moduleUuidPath());
.setComponentKey(issue.componentKey()) .setModuleUuid(issue.moduleUuid()) .setModuleUuidPath(issue.moduleUuidPath()) .setProjectUuid(issue.projectUuid()) .setProjectKey(issue.projectKey())
.setComponentKey(issue.componentKey()) .setModuleUuid(issue.moduleUuid()) .setModuleUuidPath(issue.moduleUuidPath()) .setProjectUuid(issue.projectUuid()) .setProjectKey(issue.projectKey())
public void mergeExistingOpenIssue(DefaultIssue raw, DefaultIssue base) { raw.setKey(base.key()); raw.setNew(false); copyFields(raw, base); if (base.manualSeverity()) { raw.setManualSeverity(true); raw.setSeverity(base.severity()); } else { updater.setPastSeverity(raw, base.severity(), changeContext); } // set component/module related fields from base in case current component has been moved // (in which case base issue belongs to original file and raw issue to component) raw.setComponentUuid(base.componentUuid()); raw.setComponentKey(base.componentKey()); raw.setModuleUuid(base.moduleUuid()); raw.setModuleUuidPath(base.moduleUuidPath()); // fields coming from raw updater.setPastLine(raw, base.getLine()); updater.setPastLocations(raw, base.getLocations()); updater.setPastMessage(raw, base.getMessage(), changeContext); updater.setPastGap(raw, base.gap(), changeContext); updater.setPastEffort(raw, base.effort(), changeContext); }
.setComponentKey(issue.componentKey()) .setModuleUuid(issue.moduleUuid()) .setModuleUuidPath(issue.moduleUuidPath()) .setProjectUuid(issue.projectUuid()) .setProjectKey(issue.projectKey())
.setComponentKey(issue.componentKey()) .setModuleUuid(issue.moduleUuid()) .setModuleUuidPath(issue.moduleUuidPath()) .setProjectUuid(issue.projectUuid()) .setProjectKey(issue.projectKey())