diff options
author | Go MAEDA <maeda@farend.jp> | 2018-07-09 06:07:26 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-07-09 06:07:26 +0000 |
commit | 5a2f924b767585f4392da68f80d85a386c4ee6c1 (patch) | |
tree | 416eff5fc617b5138b41dbd7d23325b97e6dfd79 /app/models/query.rb | |
parent | 5484198d98b91f287139a91cd2a858d5d75fc45a (diff) | |
download | redmine-5a2f924b767585f4392da68f80d85a386c4ee6c1.tar.gz redmine-5a2f924b767585f4392da68f80d85a386c4ee6c1.zip |
Extend watched_by_me-issue filter to include all project-members instead of only <<me>>-substitution (#8160).
Patch by Mizuki ISHIKAWA.
git-svn-id: http://svn.redmine.org/redmine/trunk@17439 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/query.rb')
-rw-r--r-- | app/models/query.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/query.rb b/app/models/query.rb index 9343e1456..f85fd0f65 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -564,6 +564,12 @@ class Query < ActiveRecord::Base statuses.collect{|s| [s.name, s.id.to_s]} end + def watcher_values + watcher_values = [["<< #{l(:label_me)} >>", "me"]] + watcher_values += users.sort_by(&:status).collect{|s| [s.name, s.id.to_s, l("status_#{User::LABEL_BY_STATUS[s.status]}")] } if User.current.allowed_to?(:view_issue_watchers, self.project) + watcher_values + end + # Returns a scope of issue custom fields that are available as columns or filters def issue_custom_fields if project |