From 72e0f0de6d21784987310297d7945204e857c19f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Lievremont Date: Tue, 4 Feb 2014 17:45:25 +0100 Subject: [PATCH] SONAR-4962 Show new_* metrics only when includetrends=true - also for XML --- .../webapp/WEB-INF/app/controllers/api/resources_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb index bb0c02edf80..f92b001f787 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb @@ -515,7 +515,7 @@ class Api::ResourcesController < Api::ApiController end if measures - measures.each do |measure| + measures.select { |measure| !measure.metric.key.start_with?('new_') || include_trends }.each do |measure| xml.msr do xml.key(measure.metric.name) xml.name(measure.metric.short_name) if verbose -- 2.39.5