From 9eab75bd1837093b628d50ed659f5016ce21921f Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Tue, 7 Feb 2012 16:34:04 +0100 Subject: [PATCH] SONAR-2747 Update email template for reviews Remove the unnecessary "--" line at the end of the mail, which makes GMail hide the footer (as it considers this as a signature). --- .../reviews/ReviewEmailTemplate.java | 2 +- .../reviews/ReviewEmailTemplateTest.java | 22 +------------------ 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/reviews/ReviewEmailTemplate.java b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/reviews/ReviewEmailTemplate.java index 73bcc5f70f8..21f54d81387 100644 --- a/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/reviews/ReviewEmailTemplate.java +++ b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/reviews/ReviewEmailTemplate.java @@ -103,7 +103,7 @@ public class ReviewEmailTemplate extends EmailTemplate { private void appendFooter(StringBuilder sb, Notification notification) { String reviewId = notification.getFieldValue("reviewId"); - sb.append("\n--\n") + sb.append("\n") .append("See it in Sonar: ").append(configuration.getServerBaseURL()).append("/reviews/view/").append(reviewId).append('\n'); } diff --git a/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/reviews/ReviewEmailTemplateTest.java b/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/reviews/ReviewEmailTemplateTest.java index d5940f63066..a55bc3502e0 100644 --- a/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/reviews/ReviewEmailTemplateTest.java +++ b/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/reviews/ReviewEmailTemplateTest.java @@ -62,7 +62,6 @@ public class ReviewEmailTemplateTest { * Comment: * This is my first comment * - * -- * See it in Sonar: http://nemo.sonarsource.org/review/view/1 * */ @@ -89,7 +88,6 @@ public class ReviewEmailTemplateTest { "Comment:\n" + " This is my first comment\n" + "\n" + - "--\n" + "See it in Sonar: http://nemo.sonarsource.org/reviews/view/1\n")); } @@ -108,7 +106,6 @@ public class ReviewEmailTemplateTest { * Was: * This is my first comment * - * -- * See it in Sonar: http://nemo.sonarsource.org/review/view/1 * */ @@ -137,7 +134,6 @@ public class ReviewEmailTemplateTest { "Was:\n" + " This is my first comment\n" + "\n" + - "--\n" + "See it in Sonar: http://nemo.sonarsource.org/reviews/view/1\n")); } @@ -153,8 +149,7 @@ public class ReviewEmailTemplateTest { * * Comment deleted, was: * This is deleted comment - * - * -- + * * See it in Sonar: http://nemo.sonarsource.org/review/view/1 * */ @@ -181,7 +176,6 @@ public class ReviewEmailTemplateTest { "Comment deleted, was:\n" + " This is deleted comment\n" + "\n" + - "--\n" + "See it in Sonar: http://nemo.sonarsource.org/reviews/view/1\n")); } @@ -197,7 +191,6 @@ public class ReviewEmailTemplateTest { * * Assignee: Evgeny Mandrikov * - * -- * See it in Sonar: http://nemo.sonarsource.org/review/view/1 * */ @@ -223,7 +216,6 @@ public class ReviewEmailTemplateTest { "\n" + "Assignee: Evgeny Mandrikov\n" + "\n" + - "--\n" + "See it in Sonar: http://nemo.sonarsource.org/reviews/view/1\n")); } @@ -239,7 +231,6 @@ public class ReviewEmailTemplateTest { * * Assignee: Simon Brandhof (was Evgeny Mandrikov) * - * -- * See it in Sonar: http://nemo.sonarsource.org/review/view/1 * */ @@ -265,7 +256,6 @@ public class ReviewEmailTemplateTest { "\n" + "Assignee: Simon Brandhof (was Evgeny Mandrikov)\n" + "\n" + - "--\n" + "See it in Sonar: http://nemo.sonarsource.org/reviews/view/1\n")); } @@ -281,7 +271,6 @@ public class ReviewEmailTemplateTest { * * Assignee: (was Simon Brandhof) * - * -- * See it in Sonar: http://nemo.sonarsource.org/review/view/1 * */ @@ -307,7 +296,6 @@ public class ReviewEmailTemplateTest { "\n" + "Assignee: (was Simon Brandhof)\n" + "\n" + - "--\n" + "See it in Sonar: http://nemo.sonarsource.org/reviews/view/1\n")); } @@ -323,7 +311,6 @@ public class ReviewEmailTemplateTest { * * Status: CLOSED (was OPEN) * - * -- * See it in Sonar: http://nemo.sonarsource.org/review/view/1 * */ @@ -348,7 +335,6 @@ public class ReviewEmailTemplateTest { "\n" + "Status: CLOSED (was OPEN)\n" + "\n" + - "--\n" + "See it in Sonar: http://nemo.sonarsource.org/reviews/view/1\n")); } @@ -365,7 +351,6 @@ public class ReviewEmailTemplateTest { * Status: REOPENED (was RESOLVED) * Resolution: (was FIXED) * - * -- * See it in Sonar: http://nemo.sonarsource.org/review/view/1 * */ @@ -393,7 +378,6 @@ public class ReviewEmailTemplateTest { "Status: REOPENED (was RESOLVED)\n" + "Resolution: (was FIXED)\n" + "\n" + - "--\n" + "See it in Sonar: http://nemo.sonarsource.org/reviews/view/1\n")); } @@ -410,7 +394,6 @@ public class ReviewEmailTemplateTest { * Status: RESOLVED (was OPEN) * Resolution: FIXED * - * -- * See it in Sonar: http://nemo.sonarsource.org/review/view/1 * */ @@ -439,7 +422,6 @@ public class ReviewEmailTemplateTest { "Status: RESOLVED (was OPEN)\n" + "Resolution: FIXED\n" + "\n" + - "--\n" + "See it in Sonar: http://nemo.sonarsource.org/reviews/view/1\n")); } @@ -458,7 +440,6 @@ public class ReviewEmailTemplateTest { * Comment: * Because! * - * -- * See it in Sonar: http://nemo.sonarsource.org/review/view/1 * */ @@ -490,7 +471,6 @@ public class ReviewEmailTemplateTest { "Comment:\n" + " Because!\n" + "\n" + - "--\n" + "See it in Sonar: http://nemo.sonarsource.org/reviews/view/1\n")); } -- 2.39.5