aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-10-16 23:26:07 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2013-10-16 23:26:07 +0200
commitd95e693578b05da9829b2ff9234aeec24d8a63a9 (patch)
tree75259736b851719b97510fa5f5c39e9faea63967
parent4a33cb77bc9a857c2f220bc64cbeab64c43e6f5e (diff)
downloadsonarqube-d95e693578b05da9829b2ff9234aeec24d8a63a9.tar.gz
sonarqube-d95e693578b05da9829b2ff9234aeec24d8a63a9.zip
SONAR-4780 When migrating from 3.6- to 3.6+, the severity of each issue is decreased by one level
-rw-r--r--sonar-server/src/main/java/org/sonar/server/db/migrations/violation/ViolationConverter.java2
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/db/migrations/violation/ViolationMigrationTest/migrate_violations_result.xml2
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-server/src/main/java/org/sonar/server/db/migrations/violation/ViolationConverter.java b/sonar-server/src/main/java/org/sonar/server/db/migrations/violation/ViolationConverter.java
index 01898b6094f..d3658297478 100644
--- a/sonar-server/src/main/java/org/sonar/server/db/migrations/violation/ViolationConverter.java
+++ b/sonar-server/src/main/java/org/sonar/server/db/migrations/violation/ViolationConverter.java
@@ -277,7 +277,7 @@ class ViolationConverter implements Callable<Object> {
}
private static class ViolationHandler extends AbstractListHandler<Map<String, Object>> {
- private static final Map<Integer, String> SEVERITIES = ImmutableMap.of(1, Severity.INFO, 2, Severity.MINOR, 3, Severity.MAJOR, 4, Severity.CRITICAL, 5, Severity.BLOCKER);
+ private static final Map<Integer, String> SEVERITIES = ImmutableMap.of(0, Severity.INFO, 1, Severity.MINOR, 2, Severity.MAJOR, 3, Severity.CRITICAL, 4, Severity.BLOCKER);
@Override
diff --git a/sonar-server/src/test/resources/org/sonar/server/db/migrations/violation/ViolationMigrationTest/migrate_violations_result.xml b/sonar-server/src/test/resources/org/sonar/server/db/migrations/violation/ViolationMigrationTest/migrate_violations_result.xml
index cafbaaf179e..b94cc90cf47 100644
--- a/sonar-server/src/test/resources/org/sonar/server/db/migrations/violation/ViolationMigrationTest/migrate_violations_result.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/db/migrations/violation/ViolationMigrationTest/migrate_violations_result.xml
@@ -42,7 +42,7 @@
- <issues ID="2" COMPONENT_ID="11" ROOT_COMPONENT_ID="10" RULE_ID="20" SEVERITY="MINOR" KEE="[ignore]"
+ <issues ID="2" COMPONENT_ID="11" ROOT_COMPONENT_ID="10" RULE_ID="20" SEVERITY="MAJOR" KEE="[ignore]"
ACTION_PLAN_KEY="[null]" ASSIGNEE="[null]" AUTHOR_LOGIN="[null]" CHECKSUM="ABCDE"
CREATED_AT="2012-01-05" EFFORT_TO_FIX="3.14" ISSUE_ATTRIBUTES="[null]" ISSUE_CLOSE_DATE="[null]" ISSUE_CREATION_DATE="2012-01-05"
ISSUE_UPDATE_DATE="2012-01-05" LINE="1234" MANUAL_SEVERITY="[false]" MESSAGE="the message" REPORTER="[null]"