diff options
author | Go MAEDA <maeda@farend.jp> | 2019-11-10 00:42:30 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-11-10 00:42:30 +0000 |
commit | 1c533c948b9e749099495ad79e80faa3f4b65aaa (patch) | |
tree | 111570895f9f3314f17dadcfa6e636b4e4bef498 /app | |
parent | e7121752c2dbb81fead71249c81e24967a0677ea (diff) | |
download | redmine-1c533c948b9e749099495ad79e80faa3f4b65aaa.tar.gz redmine-1c533c948b9e749099495ad79e80faa3f4b65aaa.zip |
Adds "Target Version" column to the list of "Available columns" in "Spent time" tab (#30346).
Patch by Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@19059 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/time_entry_query.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/time_entry_query.rb b/app/models/time_entry_query.rb index f2d0b7684..a51601620 100644 --- a/app/models/time_entry_query.rb +++ b/app/models/time_entry_query.rb @@ -34,6 +34,7 @@ class TimeEntryQuery < Query QueryAssociationColumn.new(:issue, :tracker, :caption => :field_tracker, :sortable => "#{Tracker.table_name}.position"), QueryAssociationColumn.new(:issue, :status, :caption => :field_status, :sortable => "#{IssueStatus.table_name}.position"), QueryAssociationColumn.new(:issue, :category, :caption => :field_category, :sortable => "#{IssueCategory.table_name}.name"), + QueryAssociationColumn.new(:issue, :fixed_version, :caption => :field_fixed_version, :sortable => Version.fields_for_order_statement), QueryColumn.new(:comments), QueryColumn.new(:hours, :sortable => "#{TimeEntry.table_name}.hours", :totalable => true), ] @@ -251,6 +252,9 @@ class TimeEntryQuery < Query if order_options.include?('issue_categories') joins << "LEFT OUTER JOIN #{IssueCategory.table_name} ON #{IssueCategory.table_name}.id = #{Issue.table_name}.category_id" end + if order_options.include?('versions') + joins << "LEFT OUTER JOIN #{Version.table_name} ON #{Version.table_name}.id = #{Issue.table_name}.fixed_version_id" + end end joins.compact! |