aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-12-04 20:47:17 +0100
committersimonbrandhof <simon.brandhof@gmail.com>2011-12-04 20:47:17 +0100
commit9faa102e6c91bbaad83b0b8f30a970242246e33b (patch)
tree25a8a2aa28aac60de918f8964ca4a82442f2f391
parent52338dd026fe5e2e42b5213837c55a34e4604da1 (diff)
downloadsonarqube-9faa102e6c91bbaad83b0b8f30a970242246e33b.tar.gz
sonarqube-9faa102e6c91bbaad83b0b8f30a970242246e33b.zip
SONAR-1974 fix a conflict of column names in the WS /api/violations
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb
index 02be1887f62..027c86c17a1 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb
@@ -64,7 +64,7 @@ class Api::ViolationsController < Api::ResourceRestController
rule_ids=params[:rules].split(',').map do |key_or_id|
Rule.to_i(key_or_id)
end.compact
- conditions << 'rule_id IN (:rule_ids)'
+ conditions << 'rule_failures.rule_id IN (:rule_ids)'
values[:rule_ids] = rule_ids
end
if params[:priorities]
@@ -75,10 +75,10 @@ class Api::ViolationsController < Api::ResourceRestController
end
if params[:switched_off] == "true"
- conditions << 'switched_off=:switched_off'
+ conditions << 'rule_failures.switched_off=:switched_off'
values[:switched_off] = true
else
- conditions << '(switched_off IS NULL OR switched_off=:switched_off)'
+ conditions << '(rule_failures.switched_off IS NULL OR rule_failures.switched_off=:switched_off)'
values[:switched_off] = false
end