]> source.dussan.org Git - sonarqube.git/commitdiff
[SONAR-2327] Add the commented_by param on the review search query
authorFabrice Bellingard <bellingard@gmail.com>
Mon, 11 Apr 2011 09:33:33 +0000 (11:33 +0200)
committerFabrice Bellingard <bellingard@gmail.com>
Wed, 20 Apr 2011 06:49:58 +0000 (08:49 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb

index c266654003f0f82843e34664c6614a248fe3e536..667861fc4555ad132c7829e0b8e43d147f437d4b 100644 (file)
@@ -127,9 +127,10 @@ class ReviewsController < ApplicationController
     @need_or = false;\r
     add_sql_query_param "status", @statuses\r
     add_sql_query_param "severity", @severities\r
-    add_sql_query_param "user_id", @review_authors\r
+    add_sql_query_param "reviews.user_id", @review_authors\r
+    add_sql_query_param "review_comments.user_id", @comment_authors\r
     \r
-    @reviews = Review.find :all, :conditions => [@conditions] + @values\r
+    @reviews = Review.find( :all, :order => "created_at DESC", :joins => :review_comments, :conditions => [@conditions] + @values ).uniq\r
   end\r
   \r
   def add_sql_query_param ( field, search_params )\r