summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-02-13 17:32:26 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-02-13 17:32:26 +0000
commit9548d39a15c15338c790f18cdced3b17029af282 (patch)
treeea5e1de22704396fb0729550dfaca76a1a18f469 /app/helpers
parent2b124f1e61da30a103f78a645e0237cb8c14d577 (diff)
downloadredmine-9548d39a15c15338c790f18cdced3b17029af282.tar.gz
redmine-9548d39a15c15338c790f18cdced3b17029af282.zip
Moved users list diplayed as available watchers on the new issue form to an helper.
git-svn-id: http://svn.redmine.org/redmine/trunk@13995 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/issues_helper.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index 82b8905e2..885b1c5b1 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -217,6 +217,16 @@ module IssuesHelper
message
end
+ # Returns an array of users that are proposed as watchers
+ # on the new issue form
+ def users_for_new_issue_watchers(issue)
+ users = issue.watcher_users
+ if issue.project.users.count <= 20
+ users = (users + issue.project.users.sort).uniq
+ end
+ users
+ end
+
def sidebar_queries
unless @sidebar_queries
@sidebar_queries = IssueQuery.visible.