@priorities = IssuePriority.active
@allowed_statuses = @issue.new_statuses_allowed_to(User.current, @issue.new_record?)
- @available_watchers = @issue.watcher_users
- if @issue.project.users.count <= 20
- @available_watchers = (@available_watchers + @issue.project.users.sort).uniq
- end
end
def parse_params_for_bulk_issue_attributes(params)
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.
<% if @issue.safe_attribute? 'watcher_user_ids' -%>
<p id="watchers_form"><label><%= l(:label_issue_watchers) %></label>
<span id="watchers_inputs">
- <%= watchers_checkboxes(@issue, @available_watchers) %>
+ <%= watchers_checkboxes(@issue, users_for_new_issue_watchers(@issue)) %>
</span>
<span class="search_for_watchers">
<%= link_to l(:label_search_for_watchers),