From: Jean-Baptiste Lievremont Date: Tue, 4 Feb 2014 16:45:25 +0000 (+0100) Subject: SONAR-4962 Show new_* metrics only when includetrends=true - also for XML X-Git-Tag: 4.2~262 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=72e0f0de6d21784987310297d7945204e857c19f;p=sonarqube.git SONAR-4962 Show new_* metrics only when includetrends=true - also for XML --- 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