diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-01-07 22:29:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-01-07 22:29:24 +0000 |
commit | 7943cb031c4ae9b5a60f0419d7f09d03c884c5e0 (patch) | |
tree | a7a8338c85cc5e9e621f09f89077412c102e8835 | |
parent | 721f3927bb13dd6f8369a2f7b44d76f7f748a4df (diff) |
Merged r17155 and r17156 to 3.4-stable (#27153).
git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@17157 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/controllers/calendars_controller.rb | 1 | ||||
-rw-r--r-- | test/functional/calendars_controller_test.rb | 21 |
2 files changed, 21 insertions, 1 deletions
diff --git a/app/controllers/calendars_controller.rb b/app/controllers/calendars_controller.rb index 8193ef4fc..e07ba2e61 100644 --- a/app/controllers/calendars_controller.rb +++ b/app/controllers/calendars_controller.rb @@ -39,6 +39,7 @@ class CalendarsController < ApplicationController @calendar = Redmine::Helpers::Calendar.new(Date.civil(@year, @month, 1), current_language, :month) retrieve_query @query.group_by = nil + @query.sort_criteria = nil if @query.valid? events = [] events += @query.issues(:include => [:tracker, :assigned_to, :priority], diff --git a/test/functional/calendars_controller_test.rb b/test/functional/calendars_controller_test.rb index ba0ee6c11..4454ad4cb 100644 --- a/test/functional/calendars_controller_test.rb +++ b/test/functional/calendars_controller_test.rb @@ -29,7 +29,8 @@ class CalendarsControllerTest < Redmine::ControllerTest :issue_statuses, :issue_relations, :issue_categories, - :enumerations + :enumerations, + :queries def test_show get :show, :params => { @@ -94,4 +95,22 @@ class CalendarsControllerTest < Redmine::ControllerTest assert_select 'td.even', :text => '10' end end + + def test_show_custom_query_with_multiple_sort_criteria + get :show, :params => { + :query_id => 5 + } + + assert_response :success + assert_select 'h2', :text => 'Open issues by priority and tracker' + end + + def test_show_custom_query_with_group_by_option + get :show, :params => { + :query_id => 6 + } + + assert_response :success + assert_select 'h2', :text => 'Open issues grouped by tracker' + end end |