summaryrefslogtreecommitdiffstats
path: root/lib/redmine
diff options
context:
space:
mode:
Diffstat (limited to 'lib/redmine')
-rw-r--r--lib/redmine/helpers/time_report.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/redmine/helpers/time_report.rb b/lib/redmine/helpers/time_report.rb
index 4798fe6e6..870452758 100644
--- a/lib/redmine/helpers/time_report.rb
+++ b/lib/redmine/helpers/time_report.rb
@@ -127,13 +127,16 @@ module Redmine
:label => :label_issue}
}
- # Add list and boolean custom fields as available criteria
- custom_fields = (@project.nil? ? IssueCustomField.for_all : @project.all_issue_custom_fields)
- # Add list and boolean time entry custom fields
- custom_fields += TimeEntryCustomField.all
- # Add list and boolean time entry activity custom fields
+ # Add time entry custom fields
+ custom_fields = TimeEntryCustomField.all
+ # Add project custom fields
+ custom_fields += ProjectCustomField.all
+ # Add issue custom fields
+ custom_fields += (@project.nil? ? IssueCustomField.for_all : @project.all_issue_custom_fields)
+ # Add time entry activity custom fields
custom_fields += TimeEntryActivityCustomField.all
+ # Add list and boolean custom fields as available criteria
custom_fields.select {|cf| %w(list bool).include? cf.field_format }.each do |cf|
@available_criteria["cf_#{cf.id}"] = {:sql => "#{cf.join_alias}.value",
:joins => cf.join_for_order_statement,