From 504e20c704a736580a861cb36c4d1bf2367bb400 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Wed, 7 Nov 2012 16:51:40 +0100 Subject: [PATCH] SONAR-3897 Filter disable rules in "Compare Profiles" --- .../main/webapp/WEB-INF/app/controllers/profiles_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb index ca6f1f3f325..1dc5ab7d8a1 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb @@ -335,6 +335,9 @@ class ProfilesController < ApplicationController arules2 = ActiveRule.find(:all, :order => 'rules.plugin_name, rules.plugin_rule_key', :include => [{:active_rule_parameters => :rules_parameter}, :rule], :conditions => ['active_rules.profile_id=?', @profile2.id]) + arules1.reject! { |arule| !arule.rule.enabled } + arules2.reject! { |arule| !arule.rule.enabled } + diffs_by_rule={} arules1.each do |arule1| diffs_by_rule[arule1.rule]||=RuleDiff.new(arule1.rule) -- 2.39.5