From 6aaaac237300d168a42f09a4ecf855ae1b1f9737 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 8 Feb 2015 15:35:12 +0000 Subject: [PATCH] Fixed an error in IssuesControllerTest#test_index_with_query_grouped_by_tracker_in_reverse_order with SQLServer. git-svn-id: http://svn.redmine.org/redmine/trunk@13991 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/query.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/query.rb b/app/models/query.rb index 6d043789a..847691e72 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -509,7 +509,7 @@ class Query < ActiveRecord::Base # Returns the SQL sort order that should be prepended for grouping def group_by_sort_order if grouped? && (column = group_by_column) - order = sort_criteria_order_for(column.name) || column.default_order + order = (sort_criteria_order_for(column.name) || column.default_order).upcase column.sortable.is_a?(Array) ? column.sortable.collect {|s| "#{s} #{order}"}.join(',') : "#{column.sortable} #{order}" -- 2.39.5