diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-05-27 09:19:14 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-05-27 09:19:14 +0000 |
commit | d9418864b602c93ebf4b795689b7b5fe8dd0a290 (patch) | |
tree | ce19f8a21e8fc4efea45e8b5dce64c4ac549b7b7 /app | |
parent | d6b0fca9020703f6fcdff884a99833b121bcbb94 (diff) | |
download | redmine-d9418864b602c93ebf4b795689b7b5fe8dd0a290.tar.gz redmine-d9418864b602c93ebf4b795689b7b5fe8dd0a290.zip |
Show the same trackers and statuses on time entry queries (#5385).
git-svn-id: http://svn.redmine.org/redmine/trunk@16577 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/issue_query.rb | 2 | ||||
-rw-r--r-- | app/models/query.rb | 2 | ||||
-rw-r--r-- | app/models/time_entry_query.rb | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index ae5597134..cea18cf73 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -82,7 +82,7 @@ class IssueQuery < Query def initialize_available_filters add_available_filter "status_id", - :type => :list_status, :values => lambda { issue_statuses } + :type => :list_status, :values => lambda { issue_statuses_values } add_available_filter("project_id", :type => :list, :values => lambda { project_values } diff --git a/app/models/query.rb b/app/models/query.rb index 7d6b37f36..4894a0958 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -552,7 +552,7 @@ class Query < ActiveRecord::Base end # Returns a scope of issue statuses that are available as columns for filters - def issue_statuses + def issue_statuses_values if project statuses = project.rolled_up_statuses else diff --git a/app/models/time_entry_query.rb b/app/models/time_entry_query.rb index 0502c4112..68640e7ed 100644 --- a/app/models/time_entry_query.rb +++ b/app/models/time_entry_query.rb @@ -56,11 +56,11 @@ class TimeEntryQuery < Query add_available_filter("issue.tracker_id", :type => :list, :name => l("label_attribute_of_issue", :name => l(:field_tracker)), - :values => lambda { Tracker.sorted.map {|t| [t.name, t.id.to_s]} }) + :values => lambda { trackers.map {|t| [t.name, t.id.to_s]} }) add_available_filter("issue.status_id", :type => :list, :name => l("label_attribute_of_issue", :name => l(:field_status)), - :values => lambda { IssueStatus.sorted.map {|s| [s.name, s.id.to_s]} }) + :values => lambda { issue_statuses_values }) add_available_filter("issue.fixed_version_id", :type => :list, :name => l("label_attribute_of_issue", :name => l(:field_fixed_version)), |