diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-02-04 16:35:05 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-02-04 16:35:05 +0100 |
commit | 348aa30e464cde630d5664a55366ee7dd784d147 (patch) | |
tree | 617f1bc8807b7bccc7f45979c218c1380c1592f4 | |
parent | ab7a5eb9af0b04c8257883b0acf43e376aea66cb (diff) | |
download | sonarqube-348aa30e464cde630d5664a55366ee7dd784d147.tar.gz sonarqube-348aa30e464cde630d5664a55366ee7dd784d147.zip |
SONAR-7268 Link of "New Issues" notification should bring to the project Issues page
3 files changed, 6 insertions, 6 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/notification/AbstractNewIssuesEmailTemplate.java b/server/sonar-server/src/main/java/org/sonar/server/issue/notification/AbstractNewIssuesEmailTemplate.java index 3317dd9a8a6..e6e7e3eb9ff 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/notification/AbstractNewIssuesEmailTemplate.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/notification/AbstractNewIssuesEmailTemplate.java @@ -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) diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/notification/NewIssuesEmailTemplateTest/email_with_all_details.txt b/server/sonar-server/src/test/resources/org/sonar/server/issue/notification/NewIssuesEmailTemplateTest/email_with_all_details.txt index 64d4aeb2f3f..38a8cd6bf68 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/notification/NewIssuesEmailTemplateTest/email_with_all_details.txt +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/notification/NewIssuesEmailTemplateTest/email_with_all_details.txt @@ -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 diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/notification/NewIssuesEmailTemplateTest/email_with_partial_details.txt b/server/sonar-server/src/test/resources/org/sonar/server/issue/notification/NewIssuesEmailTemplateTest/email_with_partial_details.txt index 95b996cc60d..627de81c7b2 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/notification/NewIssuesEmailTemplateTest/email_with_partial_details.txt +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/notification/NewIssuesEmailTemplateTest/email_with_partial_details.txt @@ -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 |