aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@gmail.com>2011-05-02 14:19:24 +0200
committerFabrice Bellingard <bellingard@gmail.com>2011-05-02 14:19:24 +0200
commit6a16313c50c80eb08c7acf001c6236af96fbf231 (patch)
tree938cf7699b4fc3d7aedbb1050981a658ea743b26 /sonar-server
parent42268bc95b07757f4821511342ccbd14084a0ef3 (diff)
downloadsonarqube-6a16313c50c80eb08c7acf001c6236af96fbf231.tar.gz
sonarqube-6a16313c50c80eb08c7acf001c6236af96fbf231.zip
SONAR-2327 Fix problem with Derby for SQL request
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/review.rb10
1 files changed, 6 insertions, 4 deletions
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 8d0f0359049..3a45ff5b0ed 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
@@ -109,18 +109,20 @@ class Review < ActiveRecord::Base
if authors && authors.size>0 && !authors[0].blank?
conditions << 'user_id in (:authors)'
unless Api::Utils.is_number?(authors[0])
- authors=User.logins_to_ids(authors)
+ values[:authors]=User.logins_to_ids(authors)
+ else
+ values[:authors]=authors.map{|user_id| user_id.to_i}
end
- values[:authors]=authors
end
assignees=options['assignees'].split(',') if options['assignees']
if assignees && assignees.size>0 && !assignees[0].blank?
conditions << 'assignee_id in (:assignees)'
unless Api::Utils.is_number?(assignees[0])
- assignees=User.logins_to_ids(assignees)
+ values[:assignees]=User.logins_to_ids(assignees)
+ else
+ values[:assignees]=assignees.map{|user_id| user_id.to_i}
end
- values[:assignees]=assignees
end
Review.find(:all, :include => [ 'review_comments' ], :order => 'created_at DESC', :conditions => [conditions.join(' AND '), values], :limit => 200)