]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4962 Show new_* metrics only when includetrends=true - also for XML
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Tue, 4 Feb 2014 16:45:25 +0000 (17:45 +0100)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Tue, 4 Feb 2014 16:45:32 +0000 (17:45 +0100)
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb

index bb0c02edf805a789fcc1307c900bbbee6d8d05ad..f92b001f7878d4a937c9044e05d7e6908ba121e2 100644 (file)
@@ -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