]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2397 Remove sort on Assignee and Project
authorFabrice Bellingard <bellingard@gmail.com>
Thu, 26 May 2011 12:31:00 +0000 (14:31 +0200)
committerFabrice Bellingard <bellingard@gmail.com>
Thu, 26 May 2011 12:31:00 +0000 (14:31 +0200)
The reason is that the DB request fails on Derby because of the joint
needed to get the assignee name or the project name.
FI: it worked on Postgres (and probably all other "real" DBs).

sonar-server/src/main/webapp/WEB-INF/app/models/review.rb
sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb

index 3951dc0edaf6c64483cd8d5dcc1e77f955a70f54..8789ad1a020e314697bd98bc7fdf2cdbd1407a9e 100644 (file)
@@ -184,7 +184,6 @@ class Review < ActiveRecord::Base
       sort = 'reviews.updated_at DESC'
     end
     
-    # We define 'assignee' before 'user' in the ':include' so that it is possible to sort on the assignee.name
     Review.find(:all, :include => [ 'review_comments', 'project', 'assignee', 'resource', 'user' ], :conditions => [conditions.join(' AND '), values], :order => sort, :limit => 200)
   end
 
index 0ea652fc444faa84f963befff262394b9d59c497..0b1d521a58360cacfd0c55f69bc3fea53b1f6431 100644 (file)
@@ -112,14 +112,8 @@ function launchSearch(columnName, link) {
           <a href="#" onClick="launchSearch('title', this)">Title</a>
           <%= image_tag(@asc ? "asc12.png" : "desc12.png") if @sort == 'title' -%>
         </th>
-        <th width="1%">
-          <a href="#" onClick="launchSearch('projects.name', this)">Project</a>
-          <%= image_tag(@asc ? "asc12.png" : "desc12.png") if @sort == 'projects.name' -%>
-        </th>
-        <th>
-          <a href="#" onClick="launchSearch('users.name', this)">Assignee</a>
-          <%= image_tag(@asc ? "asc12.png" : "desc12.png") if @sort == 'users.name' -%>
-        </th>
+        <th width="1%">Project</th>
+        <th>Assignee</th>
         <th>
           <a href="#" onClick="launchSearch('updated_at', this)">Age</a>
           <%= image_tag(@asc ? "asc12.png" : "desc12.png") if @sort == 'updated_at' -%>