From 6ac30297362247e51cb5518eedccad38f1dc86e1 Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Tue, 29 Aug 2017 18:37:41 +0200 Subject: [PATCH] SONAR-9721 ES index project_measures indexes 'lines' metric --- .../org/sonar/db/measure/ProjectMeasuresIndexerIterator.java | 1 + .../sonar/server/component/ws/SearchProjectsActionTest.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/measure/ProjectMeasuresIndexerIterator.java b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/ProjectMeasuresIndexerIterator.java index 7246fc7243b..31672e601d9 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/measure/ProjectMeasuresIndexerIterator.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/measure/ProjectMeasuresIndexerIterator.java @@ -54,6 +54,7 @@ public class ProjectMeasuresIndexerIterator extends CloseableIterator METRIC_KEYS = ImmutableSortedSet.of( CoreMetrics.NCLOC_KEY, + CoreMetrics.LINES_KEY, CoreMetrics.DUPLICATED_LINES_DENSITY_KEY, CoreMetrics.COVERAGE_KEY, CoreMetrics.SQALE_RATING_KEY, diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/ws/SearchProjectsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/ws/SearchProjectsActionTest.java index c8bc1fe362e..7fb817f896c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/component/ws/SearchProjectsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/component/ws/SearchProjectsActionTest.java @@ -160,10 +160,12 @@ public class SearchProjectsActionTest { Param sort = def.param("s"); assertThat(sort.defaultValue()).isEqualTo("name"); - assertThat(sort.possibleValues()).containsExactlyInAnyOrder("coverage", + assertThat(sort.possibleValues()).containsExactlyInAnyOrder( + "coverage", "reliability_rating", "duplicated_lines_density", "ncloc_language_distribution", + "lines", "new_lines", "security_rating", "new_reliability_rating", -- 2.39.5