summaryrefslogtreecommitdiffstats
path: root/app/models/time_entry_query.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-05-08 04:30:24 +0000
committerGo MAEDA <maeda@farend.jp>2020-05-08 04:30:24 +0000
commit4fd0e739dbfe69cdaada4fdba80423d5da0a154d (patch)
tree70d51a4bb09dd8fc2a809013a743cf69877a846d /app/models/time_entry_query.rb
parentdc20ffcfaeb9ac6fcbf126053d486f8efee41542 (diff)
downloadredmine-4fd0e739dbfe69cdaada4fdba80423d5da0a154d.tar.gz
redmine-4fd0e739dbfe69cdaada4fdba80423d5da0a154d.zip
Fix that totals of custom fields may not be sorted as configured (#33281).
Patch by Yuichi HARADA. git-svn-id: http://svn.redmine.org/redmine/trunk@19758 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/time_entry_query.rb')
-rw-r--r--app/models/time_entry_query.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/time_entry_query.rb b/app/models/time_entry_query.rb
index 610e7628e..c8f8eeaeb 100644
--- a/app/models/time_entry_query.rb
+++ b/app/models/time_entry_query.rb
@@ -100,7 +100,7 @@ class TimeEntryQuery < Query
add_available_filter "comments", :type => :text
add_available_filter "hours", :type => :float
- add_custom_fields_filters(TimeEntryCustomField)
+ add_custom_fields_filters(time_entry_custom_fields)
add_associations_custom_fields_filters :project
add_custom_fields_filters(issue_custom_fields, :issue)
add_associations_custom_fields_filters :user
@@ -109,11 +109,11 @@ class TimeEntryQuery < Query
def available_columns
return @available_columns if @available_columns
@available_columns = self.class.available_columns.dup
- @available_columns += TimeEntryCustomField.visible.
+ @available_columns += time_entry_custom_fields.visible.
map {|cf| QueryCustomFieldColumn.new(cf) }
@available_columns += issue_custom_fields.visible.
map {|cf| QueryAssociationCustomFieldColumn.new(:issue, cf, :totalable => false) }
- @available_columns += ProjectCustomField.visible.
+ @available_columns += project_custom_fields.visible.
map {|cf| QueryAssociationCustomFieldColumn.new(:project, cf) }
@available_columns
end