diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-02-24 08:57:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-02-24 08:57:04 +0000 |
commit | 85b872f340507d40c5f75e948b621952c7946cb3 (patch) | |
tree | d54cca3d6330ec6e20ff4f76a12f4473910b9712 /lib/redmine/helpers | |
parent | 3269fab34e86fb413d8d63c19c57a2234144c973 (diff) | |
download | redmine-85b872f340507d40c5f75e948b621952c7946cb3.tar.gz redmine-85b872f340507d40c5f75e948b621952c7946cb3.zip |
Makes project custom fields available on spent time report (#1766).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11459 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/helpers')
-rw-r--r-- | lib/redmine/helpers/time_report.rb | 13 |
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, |