From 4731a0970a32c6cfa5edce4545b7ca19fcffda0c Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Sun, 12 Nov 2023 21:40:02 +0000 Subject: [PATCH] Fix mention autocomplete not displaying for users without "Edit issues" permission (#39521). Patch by Mizuki ISHIKAWA. git-svn-id: https://svn.redmine.org/redmine/trunk@22427 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/_edit.html.erb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index d816ff6fc..219122d25 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -43,6 +43,10 @@ <%= call_hook(:view_issues_edit_notes_bottom, { :issue => @issue, :notes => @notes, :form => f }) %> <% end %> + <% if !@issue.attributes_editable? && User.current.allowed_to?(:add_issue_watchers, @issue.project) %> + <%= update_data_sources_for_auto_complete({users: watchers_autocomplete_for_mention_path(project_id: @issue.project, q: '', object_type: 'issue', + object_id: @issue.id)}) %> + <% end %> <% if @issue.attachments_addable? %>
<%= l(:label_attachment_plural) %> <% if @issue.attachments.any? && @issue.safe_attribute?('deleted_attachment_ids') %>