From f05114072b582839b997c40ea36f9267eae6b8d4 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Wed, 6 Apr 2016 10:46:54 +0200 Subject: [PATCH] SONAR-7527 Replace columns in provided "Projects" measure filter Replace column "Technical Debt" by "Code Smells", "Bugs", and "Vulnerabilities" in provided "Projects" measure filter --- .../java/org/sonar/server/measure/template/ProjectFilter.java | 4 +++- .../org/sonar/server/measure/template/ProjectFilterTest.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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); } } -- 2.39.5