diff options
author | Julien Lancelot <julien.lancelot@gmail.com> | 2013-05-21 14:14:58 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@gmail.com> | 2013-05-21 14:14:58 +0200 |
commit | 2c2728075a1c142965bf6c018ba94919955f80d8 (patch) | |
tree | add85ffc2b60ee4ac9daba127a0e4d0e96adba50 /sonar-core | |
parent | c93e1fea3a623d6d214c3fcb7b33cdd93c774937 (diff) | |
download | sonarqube-2c2728075a1c142965bf6c018ba94919955f80d8.tar.gz sonarqube-2c2728075a1c142965bf6c018ba94919955f80d8.zip |
SONAR-4301 Replace issues.severity column type from String to Integer
Diffstat (limited to 'sonar-core')
37 files changed, 105 insertions, 84 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/issue/db/IssueDto.java b/sonar-core/src/main/java/org/sonar/core/issue/db/IssueDto.java index de545172be5..8bf64abc1a3 100644 --- a/sonar-core/src/main/java/org/sonar/core/issue/db/IssueDto.java +++ b/sonar-core/src/main/java/org/sonar/core/issue/db/IssueDto.java @@ -21,14 +21,18 @@ package org.sonar.core.issue.db; import com.google.common.base.Objects; import com.google.common.base.Preconditions; +import com.google.common.base.Predicate; +import com.google.common.collect.Iterables; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; import org.sonar.api.rule.RuleKey; +import org.sonar.api.rule.Severity; import org.sonar.api.utils.KeyValueFormat; import org.sonar.core.issue.DefaultIssue; import javax.annotation.CheckForNull; import javax.annotation.Nullable; + import java.util.Date; /** @@ -40,7 +44,7 @@ public final class IssueDto { private String kee; private Integer resourceId; private Integer ruleId; - private String severity; + private Integer severity; private boolean manualSeverity; private String message; private Integer line; @@ -115,11 +119,11 @@ public final class IssueDto { } @CheckForNull - public String getSeverity() { + public Integer getSeverity() { return severity; } - public IssueDto setSeverity(@Nullable String severity) { + public IssueDto setSeverity(@Nullable Integer severity) { this.severity = severity; return this; } @@ -288,6 +292,11 @@ public final class IssueDto { return componentKey; } + @CheckForNull + public String getSeverityLabel() { + return severity != null ? Severity.ALL.get(severity - 1) : null; + } + /** * Only for unit tests */ @@ -310,6 +319,18 @@ public final class IssueDto { return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); } + private static Integer toSeverityIndex(final String severity){ + if (severity != null) { + return Iterables.indexOf(Severity.ALL, new Predicate<String>() { + @Override + public boolean apply(String currentSeverity) { + return currentSeverity.equals(severity); + } + }) + 1; + } + return null; + } + public static IssueDto toDtoForInsert(DefaultIssue issue, Integer componentId, Integer ruleId, Date now) { return new IssueDto() .setKee(issue.key()) @@ -318,7 +339,7 @@ public final class IssueDto { .setEffortToFix(issue.effortToFix()) .setResolution(issue.resolution()) .setStatus(issue.status()) - .setSeverity(issue.severity()) + .setSeverity(toSeverityIndex(issue.severity())) .setChecksum(issue.getChecksum()) .setManualSeverity(issue.manualSeverity()) .setReporter(issue.reporter()) @@ -345,7 +366,7 @@ public final class IssueDto { .setEffortToFix(issue.effortToFix()) .setResolution(issue.resolution()) .setStatus(issue.status()) - .setSeverity(issue.severity()) + .setSeverity(toSeverityIndex(issue.severity())) .setChecksum(issue.getChecksum()) .setManualSeverity(issue.manualSeverity()) .setReporter(issue.reporter()) @@ -367,7 +388,7 @@ public final class IssueDto { issue.setMessage(message); issue.setEffortToFix(effortToFix); issue.setLine(line); - issue.setSeverity(severity); + issue.setSeverity(getSeverityLabel()); issue.setReporter(reporter); issue.setAssignee(assignee); issue.setAttributes(KeyValueFormat.parse(Objects.firstNonNull(attributes, ""))); diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java index aafefbd4286..39fdd04cd98 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java @@ -32,7 +32,7 @@ import java.util.List; */ public class DatabaseVersion implements BatchComponent, ServerComponent { - public static final int LAST_VERSION = 397; + public static final int LAST_VERSION = 399; public static enum Status { UP_TO_DATE, REQUIRES_UPGRADE, REQUIRES_DOWNGRADE, FRESH_INSTALL diff --git a/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueMapper.xml b/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueMapper.xml index 9717a2417cf..01991164893 100644 --- a/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/issue/db/IssueMapper.xml @@ -210,9 +210,9 @@ <foreach item="key" index="index" collection="issueKeys" open="(" separator="," close=")">#{key} </foreach> </if> - <if test="severities != null"> + <if test="severitiesIndexSql != null"> and i.severity in - <foreach item="severity" index="index" collection="severities" open="(" separator="," close=")">#{severity} + <foreach item="severity" index="index" collection="severitiesIndexSql" open="(" separator="," close=")">#{severity} </foreach> </if> <if test="statuses != null"> diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql index 6b3fcd5313f..2311cec80a3 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql @@ -159,9 +159,9 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('388'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('391'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('392'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('394'); -INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('395'); -INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('396'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('397'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('398'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('399'); INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) VALUES (1, 'admin', 'Administrator', '', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '2011-09-26 22:27:48.0', '2011-09-26 22:27:48.0', null, null); ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2; diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl index 640817337a5..e7bcf22855a 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl @@ -521,7 +521,7 @@ CREATE TABLE "ISSUES" ( "KEE" VARCHAR(50) UNIQUE NOT NULL, "RESOURCE_ID" INTEGER NOT NULL, "RULE_ID" INTEGER, - "SEVERITY" VARCHAR(10), + "SEVERITY" INTEGER, "MANUAL_SEVERITY" BOOLEAN NOT NULL, "MESSAGE" VARCHAR(4000), "LINE" INTEGER, diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java index cfb30567f21..3c962585f19 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDaoTest.java @@ -51,7 +51,7 @@ public class IssueDaoTest extends AbstractDaoTestCase { assertThat(issue.getId()).isEqualTo(100L); assertThat(issue.getResourceId()).isEqualTo(401); assertThat(issue.getRuleId()).isEqualTo(500); - assertThat(issue.getSeverity()).isEqualTo("BLOCKER"); + assertThat(issue.getSeverity()).isEqualTo(5); assertThat(issue.isManualSeverity()).isFalse(); assertThat(issue.getMessage()).isNull(); assertThat(issue.getLine()).isEqualTo(200); @@ -227,9 +227,9 @@ public class IssueDaoTest extends AbstractDaoTestCase { IssueQuery query = IssueQuery.builder().sort(IssueQuery.Sort.SEVERITY).asc(true).build(); List<IssueDto> results = newArrayList(dao.select(query)); assertThat(results).hasSize(3); - assertThat(results.get(0).getSeverity()).isEqualTo("BLOCKER"); - assertThat(results.get(1).getSeverity()).isEqualTo("MAJOR"); - assertThat(results.get(2).getSeverity()).isEqualTo("MINOR"); + assertThat(results.get(0).getSeverityLabel()).isEqualTo("MINOR"); + assertThat(results.get(1).getSeverityLabel()).isEqualTo("MAJOR"); + assertThat(results.get(2).getSeverityLabel()).isEqualTo("BLOCKER"); } @Test diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDtoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDtoTest.java index 9598b8c796d..551dc0926e3 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueDtoTest.java @@ -63,7 +63,7 @@ public class IssueDtoTest { .setResolution(Issue.RESOLUTION_FALSE_POSITIVE) .setEffortToFix(15.0) .setLine(6) - .setSeverity("BLOCKER") + .setSeverity(5) .setMessage("message") .setManualSeverity(true) .setReporter("arthur") diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueMapperTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueMapperTest.java index d606a87080d..7767c139710 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueMapperTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueMapperTest.java @@ -46,7 +46,7 @@ public class IssueMapperTest extends AbstractDaoTestCase { dto.setEffortToFix(3.14); dto.setResolution("FIXED"); dto.setStatus("RESOLVED"); - dto.setSeverity("BLOCKER"); + dto.setSeverity(5); dto.setReporter("emmerik"); dto.setAuthorLogin("morgan"); dto.setAssignee("karadoc"); @@ -79,7 +79,7 @@ public class IssueMapperTest extends AbstractDaoTestCase { dto.setEffortToFix(3.14); dto.setResolution("FIXED"); dto.setStatus("RESOLVED"); - dto.setSeverity("BLOCKER"); + dto.setSeverity(5); dto.setReporter("emmerik"); dto.setAuthorLogin("morgan"); dto.setAssignee("karadoc"); diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/ActionPlanStatsDaoTest/should_find_by_project.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/ActionPlanStatsDaoTest/should_find_by_project.xml index f960ecd1b62..af6e601bb18 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/ActionPlanStatsDaoTest/should_find_by_project.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/ActionPlanStatsDaoTest/should_find_by_project.xml @@ -8,7 +8,7 @@ kee="ABCDE" resource_id="400" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -32,7 +32,7 @@ kee="ABCDF" resource_id="400" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -56,7 +56,7 @@ kee="ABCDG" resource_id="400" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_all.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_all.xml index 3d7bd96af21..fb1aedd7222 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_all.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_all.xml @@ -6,7 +6,7 @@ kee="ABCDE-1" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -30,7 +30,7 @@ kee="ABCDE-2" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -56,7 +56,7 @@ kee="ABCDE-3" resource_id="401" rule_id="501" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_action_plans.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_action_plans.xml index 5655372b58e..de78e71414d 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_action_plans.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_action_plans.xml @@ -6,7 +6,7 @@ resource_id="401" rule_id="500" action_plan_key="ABC" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -31,7 +31,7 @@ resource_id="401" rule_id="500" action_plan_key="ABC" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -57,7 +57,7 @@ resource_id="401" rule_id="501" action_plan_key="DEF" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_assigned.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_assigned.xml index f25c1c9e8ea..1d3d7943d7e 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_assigned.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_assigned.xml @@ -6,7 +6,7 @@ kee="ABCDE-1" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -30,7 +30,7 @@ kee="ABCDE-2" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -56,7 +56,7 @@ kee="ABCDE-3" resource_id="401" rule_id="501" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_component_root.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_component_root.xml index 34f07c20209..2319088e7f0 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_component_root.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_component_root.xml @@ -5,7 +5,7 @@ kee="100" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -29,7 +29,7 @@ kee="101" resource_id="402" rule_id="501" - severity="MAJOR" + severity="3" manual_severity="[false]" message="[null]" line="120" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_date_creation.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_date_creation.xml index 9b6f20c96ca..c1fddd480d3 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_date_creation.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_date_creation.xml @@ -5,7 +5,7 @@ kee="ABCDE-1" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -29,7 +29,7 @@ kee="ABCDE-2" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_ids.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_ids.xml index 3d6ad15c5a0..d6f85f325c4 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_ids.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_ids.xml @@ -6,7 +6,7 @@ kee="ABCDE-1" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -30,7 +30,7 @@ kee="ABCDE-2" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -56,7 +56,7 @@ kee="ABCDE" resource_id="401" rule_id="501" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_key.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_key.xml index d01f5342d87..88ca9ebd960 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_key.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_key.xml @@ -5,7 +5,7 @@ kee="ABCDE" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_planned.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_planned.xml index ded6b072043..9aa1641068b 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_planned.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_planned.xml @@ -6,7 +6,7 @@ resource_id="401" rule_id="500" action_plan_key="ABC" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -31,7 +31,7 @@ resource_id="401" rule_id="500" action_plan_key="ABC" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -57,7 +57,7 @@ resource_id="401" rule_id="501" action_plan_key="[null]" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_query.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_query.xml index 816742b954b..557be9b7ba5 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_query.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_query.xml @@ -5,7 +5,7 @@ kee="ABCDE" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_resolved.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_resolved.xml index 371d3da3f4f..886fb14e175 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_resolved.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_resolved.xml @@ -5,7 +5,7 @@ kee="ABCDE-1" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -29,7 +29,7 @@ kee="ABCDE-2" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -53,7 +53,7 @@ kee="ABCDE-3" resource_id="401" rule_id="501" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_rules.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_rules.xml index d2af6661a9e..d20560f0811 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_rules.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_by_rules.xml @@ -6,7 +6,7 @@ kee="ABCDE-1" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -30,7 +30,7 @@ kee="ABCDE-2" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -56,7 +56,7 @@ kee="ABCDE-3" resource_id="401" rule_id="501" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_issue_and_component_ids.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_issue_and_component_ids.xml index 3d7bd96af21..fb1aedd7222 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_issue_and_component_ids.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_issue_and_component_ids.xml @@ -6,7 +6,7 @@ kee="ABCDE-1" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -30,7 +30,7 @@ kee="ABCDE-2" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -56,7 +56,7 @@ kee="ABCDE-3" resource_id="401" rule_id="501" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_open_issues.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_open_issues.xml index 12f7036120e..8b3a9f44ca3 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_open_issues.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_open_issues.xml @@ -5,7 +5,7 @@ kee="100" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -29,7 +29,7 @@ kee="101" resource_id="402" rule_id="501" - severity="MAJOR" + severity="3" manual_severity="[false]" message="[null]" line="120" @@ -53,7 +53,7 @@ kee="102" resource_id="402" rule_id="501" - severity="MAJOR" + severity="3" manual_severity="[false]" message="[null]" line="120" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_assignee.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_assignee.xml index 41a97ef98b8..2f902a85565 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_assignee.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_assignee.xml @@ -6,7 +6,7 @@ kee="ABCDE-1" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -30,7 +30,7 @@ kee="ABCDE-2" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -56,7 +56,7 @@ kee="ABCDE-3" resource_id="401" rule_id="501" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_close_date.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_close_date.xml index b27051ff207..9339d6e437e 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_close_date.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_close_date.xml @@ -6,7 +6,7 @@ kee="ABCDE-1" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -30,7 +30,7 @@ kee="ABCDE-2" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -56,7 +56,7 @@ kee="ABCDE-3" resource_id="401" rule_id="501" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_creation_date.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_creation_date.xml index d84b71fa09b..b4c6ba44d29 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_creation_date.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_creation_date.xml @@ -5,7 +5,7 @@ kee="ABCDE-1" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -29,7 +29,7 @@ kee="ABCDE-2" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -53,7 +53,7 @@ kee="ABCDE-3" resource_id="401" rule_id="501" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_severity.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_severity.xml index 9dae4080973..e5ffc2e5fda 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_severity.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_severity.xml @@ -5,7 +5,7 @@ kee="ABCDE-1" resource_id="401" rule_id="500" - severity="MINOR" + severity="2" manual_severity="[false]" message="[null]" line="200" @@ -29,7 +29,7 @@ kee="ABCDE-2" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -53,7 +53,7 @@ kee="ABCDE-3" resource_id="401" rule_id="501" - severity="MAJOR" + severity="3" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_status.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_status.xml index b510a5c447a..4e12d924be8 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_status.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_status.xml @@ -6,7 +6,7 @@ kee="ABCDE-1" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -30,7 +30,7 @@ kee="ABCDE-2" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -56,7 +56,7 @@ kee="ABCDE-3" resource_id="401" rule_id="501" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_update_date.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_update_date.xml index 769bae1454d..a74da66a8c8 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_update_date.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueDaoTest/should_select_returned_sorted_result_by_update_date.xml @@ -5,7 +5,7 @@ kee="ABCDE-1" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -29,7 +29,7 @@ kee="ABCDE-2" resource_id="401" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -53,7 +53,7 @@ kee="ABCDE-3" resource_id="401" rule_id="501" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testInsert-result.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testInsert-result.xml index 69e5160f962..e32f7d9f30c 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testInsert-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testInsert-result.xml @@ -4,7 +4,7 @@ kee="ABCDE" resource_id="123" rule_id="200" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="the message" line="500" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate-result.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate-result.xml index 57bc88451ea..7bcccd58b05 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate-result.xml @@ -23,7 +23,7 @@ kee="ABCDE" resource_id="123" rule_id="200" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="the message" line="500" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate.xml index 06ee1af1b50..9e13008d3db 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueMapperTest/testUpdate.xml @@ -23,7 +23,7 @@ kee="ABCDE" resource_id="123" rule_id="200" - severity="INFO" + severity="1" manual_severity="[false]" message="old" line="[null]" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_insert_new_issues-result.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_insert_new_issues-result.xml index 97ca9b21656..0a10ae36591 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_insert_new_issues-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_insert_new_issues-result.xml @@ -1,5 +1,5 @@ <dataset> - <issues id="1" kee="ABCDE" resolution="OPEN" status="OPEN" severity="BLOCKER" manual_severity="[false]" + <issues id="1" kee="ABCDE" resolution="OPEN" status="OPEN" severity="5" manual_severity="[false]" assignee="[null]" author_login="[null]" checksum="[null]" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues-result.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues-result.xml index 862d14f2b75..17f7def9bf3 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues-result.xml @@ -3,7 +3,7 @@ kee="ABCDE" resolution="FIXED" status="RESOLVED" - severity="BLOCKER" + severity="5" manual_severity="[false]" assignee="loic" author_login="simon" diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues.xml index 4d8e2449c57..709dc7ccf89 100644 --- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues.xml +++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueStorageTest/should_update_issues.xml @@ -3,7 +3,7 @@ kee="ABCDE" resolution="OPEN" status="OPEN" - severity="BLOCKER" + severity="5" manual_severity="[false]" assignee="loic" author_login="simon" diff --git a/sonar-core/src/test/resources/org/sonar/core/persistence/DryRunDatabaseFactoryTest/should_create_database_with_issues.xml b/sonar-core/src/test/resources/org/sonar/core/persistence/DryRunDatabaseFactoryTest/should_create_database_with_issues.xml index 5bf87b320ac..3a331c75814 100644 --- a/sonar-core/src/test/resources/org/sonar/core/persistence/DryRunDatabaseFactoryTest/should_create_database_with_issues.xml +++ b/sonar-core/src/test/resources/org/sonar/core/persistence/DryRunDatabaseFactoryTest/should_create_database_with_issues.xml @@ -23,7 +23,7 @@ kee="100" resource_id="400" rule_id="500" - severity="BLOCKER" + severity="5" manual_severity="[false]" message="[null]" line="200" @@ -47,7 +47,7 @@ kee="101" resource_id="401" rule_id="501" - severity="MAJOR" + severity="3" manual_severity="[false]" message="[null]" line="120" diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteResource.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteResource.xml index e8a31f031de..22d0be9cb39 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteResource.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteResource.xml @@ -24,7 +24,7 @@ <review_comments id="1" created_at="[null]" updated_at="[null]" review_id="1" user_id="1223" review_text="abc"/> - <issues id="1" kee="ABCDE" resource_id="1" status="CLOSED" resolution="[null]" line="200" severity="BLOCKER" + <issues id="1" kee="ABCDE" resource_id="1" status="CLOSED" resolution="[null]" line="200" severity="5" reporter="perceval" assignee="arthur" rule_id="500" manual_severity="[false]" message="[null]" diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteProject.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteProject.xml index 5c57259dab6..887df900278 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteProject.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteProject.xml @@ -31,7 +31,7 @@ <review_comments id="1" created_at="[null]" updated_at="[null]" review_id="2" user_id="1223" review_text="abc"/> - <issues id="1" kee="ABCDE" resource_id="1" status="CLOSED" resolution="[null]" line="200" severity="BLOCKER" + <issues id="1" kee="ABCDE" resource_id="1" status="CLOSED" resolution="[null]" line="200" severity="5" reporter="perceval" assignee="arthur" rule_id="500" manual_severity="[false]" message="[null]" @@ -43,7 +43,7 @@ issue_close_date="2013-04-16" /> - <issues id="2" kee="ABCDF" resource_id="1" status="CLOSED" resolution="[null]" line="200" severity="BLOCKER" + <issues id="2" kee="ABCDF" resource_id="1" status="CLOSED" resolution="[null]" line="200" severity="5" reporter="perceval" assignee="arthur" rule_id="500" manual_severity="[false]" message="[null]" |