]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5952 Update the issue permalink in the notification email
authorJulien HENRY <julien.henry@sonarsource.com>
Wed, 17 Dec 2014 14:30:50 +0000 (15:30 +0100)
committerJulien HENRY <julien.henry@sonarsource.com>
Wed, 17 Dec 2014 14:49:06 +0000 (15:49 +0100)
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/notification/IssueChangesEmailTemplate.java
plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/issue/notification/IssueChangesEmailTemplateTest/display_component_key_if_no_component_name.txt
plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/issue/notification/IssueChangesEmailTemplateTest/email_with_action_plan_change.txt
plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/issue/notification/IssueChangesEmailTemplateTest/email_with_assignee_change.txt
plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/issue/notification/IssueChangesEmailTemplateTest/email_with_multiple_changes.txt

index 9a342524d2fb3b006c4fcc7e54bde9feb345852b..7f008ba3ccafbf01ee6357a02ea7a0e8fd584120 100644 (file)
@@ -81,7 +81,7 @@ public class IssueChangesEmailTemplate extends EmailTemplate {
     appendField(sb, "Status", notif.getFieldValue("old.status"), notif.getFieldValue("new.status"));
     appendField(sb, "Message", notif.getFieldValue("old.message"), notif.getFieldValue("new.message"));
     appendField(sb, "Author", notif.getFieldValue("old.author"), notif.getFieldValue("new.author"));
-    appendFieldWithoutHistory(sb, "Action Plan", notif.getFieldValue("old.actionPlan"), notif.getFieldValue("new.actionPlan")) ;
+    appendFieldWithoutHistory(sb, "Action Plan", notif.getFieldValue("old.actionPlan"), notif.getFieldValue("new.actionPlan"));
   }
 
   private void appendHeader(Notification notif, StringBuilder sb) {
@@ -92,9 +92,7 @@ public class IssueChangesEmailTemplate extends EmailTemplate {
 
   private void appendFooter(StringBuilder sb, Notification notification) {
     String issueKey = notification.getFieldValue("key");
-    String componentKey = notification.getFieldValue("componentKey");
-    sb.append("See it in SonarQube: ").append(settings.getServerBaseURL()).append("/component/index#component=").append(componentKey)
-      .append("&currentIssue=").append(issueKey).append(NEW_LINE);
+    sb.append("See it in SonarQube: ").append(settings.getServerBaseURL()).append("/issues/search#issues=").append(issueKey).append(NEW_LINE);
   }
 
   private void appendLine(StringBuilder sb, @Nullable String line) {
index 1fc46b2e8f7fdf961038bf34eb96a3e9f5f42f80..f9a4356907a92428de92df5b1d9847f924a1c164 100644 (file)
@@ -4,4 +4,4 @@ Message: Has 3 cycles
 
 Action Plan changed to ABC 1.0
 
-See it in SonarQube: http://nemo.sonarsource.org/component/index#component=org.apache.struts.Action&currentIssue=ABCDE
+See it in SonarQube: http://nemo.sonarsource.org/issues/search#issues=ABCDE
index aec09dd4b523497cb5bf0e7784b219ed2110b1da..fd4c140e55ed021e84f5ff265054528d76a77bd0 100644 (file)
@@ -4,4 +4,4 @@ Message: Has 3 cycles
 
 Assignee changed to louis
 
-See it in SonarQube: http://nemo.sonarsource.org/component/index#component=org.apache.struts.Action&currentIssue=ABCDE
+See it in SonarQube: http://nemo.sonarsource.org/issues/search#issues=ABCDE
index 6bee33751fd997a6854a282e2626c950c8e0122e..6462b448895d8f58cae21acf9328f673c35b99da 100644 (file)
@@ -7,4 +7,4 @@ Assignee changed to louis
 Resolution: FALSE-POSITIVE
 Status: RESOLVED
 
-See it in SonarQube: http://nemo.sonarsource.org/component/index#component=org.apache.struts.Action&currentIssue=ABCDE
+See it in SonarQube: http://nemo.sonarsource.org/issues/search#issues=ABCDE