aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/review.rb11
2 files changed, 5 insertions, 8 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb
index 62b3f3b8759..48bcf107ba7 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb
@@ -308,7 +308,7 @@ class ReviewsController < ApplicationController
end
def search_reviews
- options = {}
+ options = {'review_type' => 'VIOLATION'}
unless @statuses == ['']
options['statuses']=@statuses.join(',')
end
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/review.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/review.rb
index 1f91e4abe79..3fe1de33f86 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/models/review.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/models/review.rb
@@ -53,13 +53,10 @@ class Review < ActiveRecord::Base
conditions=[]
values={}
- review_type = options['review_type']
- if review_type
- conditions << 'review_type=:type'
- values[:type] = review_type.upcase
- else
- conditions=['review_type<>:not_type']
- values={:not_type => Review::TYPE_FALSE_POSITIVE}
+ review_type = options['review_type'].split(',') if options['review_type']
+ if review_type && review_type.size>0 && !review_type[0].blank?
+ conditions << 'review_type in (:review_type)'
+ values[:review_type]=review_type
end
ids=options['ids'].split(',') if options['ids']