diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-03 13:59:15 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-03 13:59:15 +0000 |
commit | 902d4bcf1caf5171e151644d7c1490dbe93cca95 (patch) | |
tree | 5043db8fb7d98840f217ccea94a5ad14659b0677 /lib/redmine/helpers | |
parent | 03329b5d4d59a5046cc97c5b3ab221878ad9688a (diff) | |
download | redmine-902d4bcf1caf5171e151644d7c1490dbe93cca95.tar.gz redmine-902d4bcf1caf5171e151644d7c1490dbe93cca95.zip |
Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11108 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/helpers')
-rw-r--r-- | lib/redmine/helpers/time_report.rb | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/lib/redmine/helpers/time_report.rb b/lib/redmine/helpers/time_report.rb index 181598af2..20a3798d8 100644 --- a/lib/redmine/helpers/time_report.rb +++ b/lib/redmine/helpers/time_report.rb @@ -129,23 +129,12 @@ module Redmine # Add list and boolean custom fields as available criteria custom_fields = (@project.nil? ? IssueCustomField.for_all : @project.all_issue_custom_fields) - 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, - :format => cf.field_format, - :label => cf.name} - end if @project - # Add list and boolean time entry custom fields - TimeEntryCustomField.all.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, - :format => cf.field_format, - :label => cf.name} - end - + custom_fields += TimeEntryCustomField.all # Add list and boolean time entry activity custom fields - TimeEntryActivityCustomField.all.select {|cf| %w(list bool).include? cf.field_format }.each do |cf| + custom_fields += TimeEntryActivityCustomField.all + + 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, :format => cf.field_format, |