summaryrefslogtreecommitdiffstats
path: root/lib/redmine/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-03-13 19:17:59 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-03-13 19:17:59 +0000
commit71d88e55352a51b20dd5e2a4a44aa695834a36b9 (patch)
tree8d5708333c51b7da7319a5c182350758b00dc535 /lib/redmine/helpers
parentb91489ce6bb0943cff50946af6e64be65d3ccd80 (diff)
downloadredmine-71d88e55352a51b20dd5e2a4a44aa695834a36b9.tar.gz
redmine-71d88e55352a51b20dd5e2a4a44aa695834a36b9.zip
Get rid of sort_helper when using queries.
git-svn-id: http://svn.redmine.org/redmine/trunk@16390 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/helpers')
-rw-r--r--lib/redmine/helpers/time_report.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/redmine/helpers/time_report.rb b/lib/redmine/helpers/time_report.rb
index e06499ea8..9e3448ba7 100644
--- a/lib/redmine/helpers/time_report.rb
+++ b/lib/redmine/helpers/time_report.rb
@@ -46,6 +46,7 @@ module Redmine
time_columns = %w(tyear tmonth tweek spent_on)
@hours = []
@scope.includes(:activity).
+ reorder(nil).
group(@criteria.collect{|criteria| @available_criteria[criteria][:sql]} + time_columns).
joins(@criteria.collect{|criteria| @available_criteria[criteria][:joins]}.compact).
sum(:hours).each do |hash, hours|