summaryrefslogtreecommitdiffstats
path: root/plugins/sonar-email-notifications-plugin
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@gmail.com>2012-02-08 10:15:56 +0100
committerFabrice Bellingard <bellingard@gmail.com>2012-02-08 10:15:56 +0100
commit85e7e49bcfa5fb64fd499060c279cd679c799e39 (patch)
tree613184fccfd86801471d0907633be90712717145 /plugins/sonar-email-notifications-plugin
parent6a86b71f63edfb4b9a07246a40fd5c6dccf098a7 (diff)
downloadsonarqube-85e7e49bcfa5fb64fd499060c279cd679c799e39.tar.gz
sonarqube-85e7e49bcfa5fb64fd499060c279cd679c799e39.zip
SONAR-2747 Verification is now done on period1
And not necessarily 'since last analysis' period.
Diffstat (limited to 'plugins/sonar-email-notifications-plugin')
-rw-r--r--plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsEmailTemplate.java3
-rw-r--r--plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsEmailTemplateTest.java5
2 files changed, 3 insertions, 5 deletions
diff --git a/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsEmailTemplate.java b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsEmailTemplate.java
index 20d590658b9..bfd105102d9 100644
--- a/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsEmailTemplate.java
+++ b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsEmailTemplate.java
@@ -64,10 +64,9 @@ public class NewViolationsEmailTemplate extends EmailTemplate {
private void appendFooter(StringBuilder sb, Notification notification) {
String projectKey = notification.getFieldValue("projectKey");
- String period = notification.getFieldValue("period");
sb.append("\n")
.append("See it in Sonar: ").append(configuration.getServerBaseURL()).append("/drilldown/measures/").append(projectKey)
- .append("?metric=new_violations&period=").append(period).append('\n');
+ .append("?metric=new_violations&period=1\n");
}
}
diff --git a/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsEmailTemplateTest.java b/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsEmailTemplateTest.java
index c5c46712a94..4fc6c220945 100644
--- a/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsEmailTemplateTest.java
+++ b/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsEmailTemplateTest.java
@@ -57,7 +57,7 @@ public class NewViolationsEmailTemplateTest {
* Project: Foo
* 32 new violations on last analysis (introduced between 2012-01-02 and 2012-01-15)
*
- * See it in Sonar: http://nemo.sonarsource.org/drilldown/measures/org.sonar.foo:foo?metric=new_violations&period=2
+ * See it in Sonar: http://nemo.sonarsource.org/drilldown/measures/org.sonar.foo:foo?metric=new_violations&period=1
* </pre>
*/
@Test
@@ -67,7 +67,6 @@ public class NewViolationsEmailTemplateTest {
.setFieldValue("projectName", "Foo")
.setFieldValue("projectKey", "org.sonar.foo:foo")
.setFieldValue("projectId", "45")
- .setFieldValue("period", "2")
.setFieldValue("fromDate", "2012-01-02")
.setFieldValue("toDate", "2012-01-15");
@@ -78,7 +77,7 @@ public class NewViolationsEmailTemplateTest {
"Project: Foo\n" +
"32 new violations on last analysis (introduced between 2012-01-02 and 2012-01-15)\n" +
"\n" +
- "See it in Sonar: http://nemo.sonarsource.org/drilldown/measures/org.sonar.foo:foo?metric=new_violations&period=2\n"));
+ "See it in Sonar: http://nemo.sonarsource.org/drilldown/measures/org.sonar.foo:foo?metric=new_violations&period=1\n"));
}
}