From: Julien Lancelot Date: Wed, 6 Apr 2016 08:46:54 +0000 (+0200) Subject: SONAR-7527 Replace columns in provided "Projects" measure filter X-Git-Tag: 5.5-RC1~28 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f05114072b582839b997c40ea36f9267eae6b8d4;p=sonarqube.git SONAR-7527 Replace columns in provided "Projects" measure filter Replace column "Technical Debt" by "Code Smells", "Bugs", and "Vulnerabilities" in provided "Projects" measure filter --- diff --git a/server/sonar-server/src/main/java/org/sonar/server/measure/template/ProjectFilter.java b/server/sonar-server/src/main/java/org/sonar/server/measure/template/ProjectFilter.java index 762e4d783e6..4b79a70f665 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/measure/template/ProjectFilter.java +++ b/server/sonar-server/src/main/java/org/sonar/server/measure/template/ProjectFilter.java @@ -48,7 +48,9 @@ public class ProjectFilter extends FilterTemplate { .add(FilterColumn.create("name", null, FilterColumn.ASC, false)) .add(FilterColumn.create("version", null, FilterColumn.DESC, false)) .add(FilterColumn.create("metric", CoreMetrics.NCLOC_KEY, FilterColumn.DESC, false)) - .add(FilterColumn.create("metric", CoreMetrics.TECHNICAL_DEBT_KEY, FilterColumn.DESC, false)) + .add(FilterColumn.create("metric", CoreMetrics.CODE_SMELLS_KEY, FilterColumn.DESC, false)) + .add(FilterColumn.create("metric", CoreMetrics.BUGS_KEY, FilterColumn.DESC, false)) + .add(FilterColumn.create("metric", CoreMetrics.VULNERABILITIES_KEY, FilterColumn.DESC, false)) .add(FilterColumn.create("date", null, FilterColumn.DESC, false)); } } diff --git a/server/sonar-server/src/test/java/org/sonar/server/measure/template/ProjectFilterTest.java b/server/sonar-server/src/test/java/org/sonar/server/measure/template/ProjectFilterTest.java index e5ea290a16d..85950a85afc 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/measure/template/ProjectFilterTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/measure/template/ProjectFilterTest.java @@ -34,6 +34,6 @@ public class ProjectFilterTest { assertThat(template.getName()).isEqualTo("Projects"); assertThat(filter).isNotNull(); assertThat(filter.getCriteria()).hasSize(1); - assertThat(filter.getColumns()).hasSize(6); + assertThat(filter.getColumns()).hasSize(8); } }