From 6a16313c50c80eb08c7acf001c6236af96fbf231 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Mon, 2 May 2011 14:19:24 +0200 Subject: [PATCH] SONAR-2327 Fix problem with Derby for SQL request --- .../src/main/webapp/WEB-INF/app/models/review.rb | 10 ++++++---- 1 file 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) -- 2.39.5