summaryrefslogtreecommitdiffstats
path: root/lib/redmine/helpers/time_report.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/redmine/helpers/time_report.rb')
-rw-r--r--lib/redmine/helpers/time_report.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/helpers/time_report.rb b/lib/redmine/helpers/time_report.rb
index 79ac6b020..c6e98ebf1 100644
--- a/lib/redmine/helpers/time_report.rb
+++ b/lib/redmine/helpers/time_report.rb
@@ -49,7 +49,7 @@ module Redmine
@scope.includes(:activity).
reorder(nil).
group(@criteria.collect{|criteria| @available_criteria[criteria][:sql]} + time_columns).
- joins(@criteria.collect{|criteria| @available_criteria[criteria][:joins]}.compact).
+ joins(@criteria.filter_map{|criteria| @available_criteria[criteria][:joins]}).
sum(:hours).each do |hash, hours|
h = {'hours' => hours}
(@criteria + time_columns).each_with_index do |name, i|