From 68abaf902d32166f637242d04187cdd5dfc62d81 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Thu, 26 May 2011 14:31:00 +0200 Subject: [PATCH] SONAR-2397 Remove sort on Assignee and Project 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). --- .../src/main/webapp/WEB-INF/app/models/review.rb | 1 - .../webapp/WEB-INF/app/views/reviews/index.html.erb | 10 ++-------- 2 files changed, 2 insertions(+), 9 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 3951dc0edaf..8789ad1a020 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 @@ -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 diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb index 0ea652fc444..0b1d521a583 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb @@ -112,14 +112,8 @@ function launchSearch(columnName, link) { Title <%= image_tag(@asc ? "asc12.png" : "desc12.png") if @sort == 'title' -%> - - Project - <%= image_tag(@asc ? "asc12.png" : "desc12.png") if @sort == 'projects.name' -%> - - - Assignee - <%= image_tag(@asc ? "asc12.png" : "desc12.png") if @sort == 'users.name' -%> - + Project + Assignee Age <%= image_tag(@asc ? "asc12.png" : "desc12.png") if @sort == 'updated_at' -%> -- 2.39.5