diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2011-05-19 16:47:47 +0200 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2011-05-19 16:47:47 +0200 |
commit | c04e9137357c3b2be3e0b2c12a434338f05b673f (patch) | |
tree | 6fe9cf534564d0f5fd8aeb0f87bf397089fabb30 /sonar-server | |
parent | a2c5df1dbf57b181e9b0433854455c601d3d97ae (diff) | |
parent | 37a655ada80cfe64ba883d04f9e76736a79b3501 (diff) | |
download | sonarqube-c04e9137357c3b2be3e0b2c12a434338f05b673f.tar.gz sonarqube-c04e9137357c3b2be3e0b2c12a434338f05b673f.zip |
Merge branch 'WS'
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb | 2 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/models/review.rb | 11 |
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'] |