]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7527 Replace columns in provided "Projects" measure filter
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 6 Apr 2016 08:46:54 +0000 (10:46 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 6 Apr 2016 08:46:54 +0000 (10:46 +0200)
Replace column "Technical Debt" by "Code Smells", "Bugs", and "Vulnerabilities" in provided "Projects" measure filter

server/sonar-server/src/main/java/org/sonar/server/measure/template/ProjectFilter.java
server/sonar-server/src/test/java/org/sonar/server/measure/template/ProjectFilterTest.java

index 762e4d783e6ce01488313a08002a5f28c3376634..4b79a70f6656b162c60ff04537273a51297b640e 100644 (file)
@@ -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));
   }
 }
index e5ea290a16d682a706955c9517fe932c889aff3b..85950a85afcb77c1ab88fce4bb8a9a60e7f1567d 100644 (file)
@@ -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);
   }
 }