@@ -546,7 +546,7 class Query < ActiveRecord::Base | |||||
546 | if grouped? && (column = group_by_column) |
|
546 | if grouped? && (column = group_by_column) | |
547 | order = (sort_criteria_order_for(column.name) || column.default_order).try(:upcase) |
|
547 | order = (sort_criteria_order_for(column.name) || column.default_order).try(:upcase) | |
548 | column.sortable.is_a?(Array) ? |
|
548 | column.sortable.is_a?(Array) ? | |
549 |
column.sortable.collect {|s| "#{s} #{order}"} |
|
549 | column.sortable.collect {|s| "#{s} #{order}"} : | |
550 | "#{column.sortable} #{order}" |
|
550 | "#{column.sortable} #{order}" | |
551 | end |
|
551 | end | |
552 | end |
|
552 | end |
@@ -273,6 +273,22 class IssuesControllerTest < ActionController::TestCase | |||||
273 | assert_not_nil assigns(:issue_count_by_group) |
|
273 | assert_not_nil assigns(:issue_count_by_group) | |
274 | end |
|
274 | end | |
275 |
|
275 | |||
|
276 | def test_index_with_query_grouped_and_sorted_by_fixed_version | |||
|
277 | get :index, :project_id => 1, :set_filter => 1, :group_by => "fixed_version", :sort => "fixed_version" | |||
|
278 | assert_response :success | |||
|
279 | assert_template 'index' | |||
|
280 | assert_not_nil assigns(:issues) | |||
|
281 | assert_not_nil assigns(:issue_count_by_group) | |||
|
282 | end | |||
|
283 | ||||
|
284 | def test_index_with_query_grouped_and_sorted_by_fixed_version_in_reverse_order | |||
|
285 | get :index, :project_id => 1, :set_filter => 1, :group_by => "fixed_version", :sort => "fixed_version:desc" | |||
|
286 | assert_response :success | |||
|
287 | assert_template 'index' | |||
|
288 | assert_not_nil assigns(:issues) | |||
|
289 | assert_not_nil assigns(:issue_count_by_group) | |||
|
290 | end | |||
|
291 | ||||
276 | def test_index_with_query_grouped_by_list_custom_field |
|
292 | def test_index_with_query_grouped_by_list_custom_field | |
277 | get :index, :project_id => 1, :query_id => 9 |
|
293 | get :index, :project_id => 1, :query_id => 9 | |
278 | assert_response :success |
|
294 | assert_response :success |
General Comments 0
You need to be logged in to leave comments.
Login now