]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5912 fix notification of issue changes during analysis
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 26 Jan 2015 10:49:53 +0000 (11:49 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 26 Jan 2015 11:02:52 +0000 (12:02 +0100)
server/sonar-server/src/main/java/org/sonar/server/computation/AnalysisReportService.java
sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/issue/ReportIssue.java
sonar-batch/src/main/java/org/sonar/batch/report/IssuesPublisher.java

index ef8391f12ffaf32d88033d91bde74901e7506f01..9fa4fdcda5090710f84ffb983135b63c59c3b242 100644 (file)
@@ -123,6 +123,7 @@ public class AnalysisReportService {
     defaultIssue.setChanged(issue.isChanged());
     defaultIssue.setNew(issue.isNew());
     defaultIssue.setSelectedAt(issue.selectedAt());
+    defaultIssue.setSendNotifications(issue.mustSendNotifications());
     return defaultIssue;
   }
 
index 0de8dd5803e0c7e87a3e9658e8cf88b7535c1edb..23d62dbf23a53cc74812fc1dbfa1b9754d71922b 100644 (file)
@@ -54,6 +54,7 @@ public class ReportIssue {
   private Long selectedAt;
   private String diffFields;
   private boolean isChanged;
+  private boolean mustSendNotification;
 
 
   public ReportIssue setKey(String key) {
@@ -286,4 +287,12 @@ public class ReportIssue {
     return isChanged;
   }
 
+  public ReportIssue setMustSendNotification(boolean mustSendNotification) {
+    this.mustSendNotification = mustSendNotification;
+    return this;
+  }
+
+  public boolean mustSendNotifications() {
+    return mustSendNotification;
+  }
 }
index 4edf13d2e18acc3df5b4c1c5d68f28eafaabd0c0..20982cf594b2a24c4323865389f3ea1b74857b2b 100644 (file)
@@ -82,6 +82,7 @@ public class IssuesPublisher implements ReportPublisher {
       .setSelectedAt(issue.selectedAt())
       .setDiffFields(toString(issue.currentChange()))
       .setTags(issue.tags())
+      .setMustSendNotification(issue.mustSendNotifications())
       .setChanged(issue.isChanged());
   }