From: Fabrice Bellingard Date: Mon, 2 May 2011 12:19:24 +0000 (+0200) Subject: SONAR-2327 Fix problem with Derby for SQL request X-Git-Tag: 2.8~64 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6a16313c50c80eb08c7acf001c6236af96fbf231;p=sonarqube.git SONAR-2327 Fix problem with Derby for SQL request --- 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)