]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7268 Link of "New Issues" notification should bring to the project Issues page
authorStas Vilchik <vilchiks@gmail.com>
Thu, 4 Feb 2016 15:35:05 +0000 (16:35 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 4 Feb 2016 15:35:05 +0000 (16:35 +0100)
server/sonar-server/src/main/java/org/sonar/server/issue/notification/AbstractNewIssuesEmailTemplate.java
server/sonar-server/src/test/resources/org/sonar/server/issue/notification/NewIssuesEmailTemplateTest/email_with_all_details.txt
server/sonar-server/src/test/resources/org/sonar/server/issue/notification/NewIssuesEmailTemplateTest/email_with_partial_details.txt

index 3317dd9a8a6d92c24ed7e83d3d1172fb1e7256c1..e6e7e3eb9ffbed928570f8dbbf76a9ab235a811b 100644 (file)
@@ -171,12 +171,12 @@ public abstract class AbstractNewIssuesEmailTemplate extends EmailTemplate {
   }
 
   protected void appendFooter(StringBuilder message, Notification notification) {
-    String projectUuid = notification.getFieldValue(FIELD_PROJECT_UUID);
+    String projectKey = notification.getFieldValue(FIELD_PROJECT_KEY);
     String dateString = notification.getFieldValue(FIELD_PROJECT_DATE);
-    if (projectUuid != null && dateString != null) {
+    if (projectKey != null && dateString != null) {
       Date date = DateUtils.parseDateTime(dateString);
-      String url = String.format("%s/issues/search#projectUuids=%s|createdAt=%s",
-        settings.getServerBaseURL(), encode(projectUuid), encode(DateUtils.formatDateTime(date)));
+      String url = String.format("%s/component_issues?id=%s#createdAt=%s",
+        settings.getServerBaseURL(), encode(projectKey), encode(DateUtils.formatDateTime(date)));
       message
         .append("See it in SonarQube: ")
         .append(url)
index 64d4aeb2f3f34e85b229e21d8a5c338f8713a3dc..38a8cd6bf68ad095102100a2cc84a965c80abdf8 100644 (file)
@@ -21,4 +21,4 @@ Project: Struts
         /path/to/file: 3
         /path/to/directory: 7
 
-See it in SonarQube: http://nemo.sonarsource.org/issues/search#projectUuids=ABCDE|createdAt=2010-05-1
\ No newline at end of file
+See it in SonarQube: http://nemo.sonarsource.org/component_issues?id=org.apache%3Astruts#createdAt=2010-05-1
\ No newline at end of file
index 95b996cc60db52fe4960c5f118922a53e6376819..627de81c7b2b98ba040a754ad4f9bec71da8e666 100644 (file)
@@ -5,4 +5,4 @@ Project: Struts
     Severity
         Blocker: 0    Critical: 5    Major: 10    Minor: 3    Info: 1
 
-See it in SonarQube: http://nemo.sonarsource.org/issues/search#projectUuids=ABCDE|createdAt=2010-05-1
\ No newline at end of file
+See it in SonarQube: http://nemo.sonarsource.org/component_issues?id=org.apache%3Astruts#createdAt=2010-05-1
\ No newline at end of file