summaryrefslogtreecommitdiffstats
path: root/app/helpers/issues_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/issues_helper.rb')
-rw-r--r--app/helpers/issues_helper.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index 2ea81d566..0f327b77e 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -365,8 +365,11 @@ module IssuesHelper
# on the new issue form
def users_for_new_issue_watchers(issue)
users = issue.watcher_users.select{|u| u.status == User::STATUS_ACTIVE}
- if issue.project.users.count <= 20
- users = (users + issue.project.users.sort).uniq
+ project = issue.project
+ scope_users = project.users
+ scope_groups = project.principals.merge(Group.givable)
+ if scope_users.count + scope_groups.count <= 20
+ users = (users + scope_users.sort + scope_groups.sort).uniq
end
users
end