diff options
author | Go MAEDA <maeda@farend.jp> | 2018-07-12 21:58:22 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-07-12 21:58:22 +0000 |
commit | 391bc8b763c603b81a98292795a756c10ab3ef06 (patch) | |
tree | 133d8468b9697128c204da4b9bb6cba7c216b142 /lib/redmine/helpers/time_report.rb | |
parent | cfae2f9037cbbdfcbce9457b704218536a3c33f2 (diff) | |
download | redmine-391bc8b763c603b81a98292795a756c10ab3ef06.tar.gz redmine-391bc8b763c603b81a98292795a756c10ab3ef06.zip |
Only allow the use of visible custom fields in time entry reports (#29162).
Patch by Holger Just.
git-svn-id: http://svn.redmine.org/redmine/trunk@17446 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/helpers/time_report.rb')
-rw-r--r-- | lib/redmine/helpers/time_report.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/redmine/helpers/time_report.rb b/lib/redmine/helpers/time_report.rb index fb6384cb6..5287ae95e 100644 --- a/lib/redmine/helpers/time_report.rb +++ b/lib/redmine/helpers/time_report.rb @@ -129,13 +129,13 @@ module Redmine } # Add time entry custom fields - custom_fields = TimeEntryCustomField.all + custom_fields = TimeEntryCustomField.visible # Add project custom fields - custom_fields += ProjectCustomField.all + custom_fields += ProjectCustomField.visible # Add issue custom fields - custom_fields += (@project.nil? ? IssueCustomField.for_all : @project.all_issue_custom_fields) + custom_fields += @project.nil? ? IssueCustomField.visible.for_all : @project.all_issue_custom_fields.visible # Add time entry activity custom fields - custom_fields += TimeEntryActivityCustomField.all + custom_fields += TimeEntryActivityCustomField.visible # Add list and boolean custom fields as available criteria custom_fields.select {|cf| %w(list bool).include?(cf.field_format) && !cf.multiple?}.each do |cf| |