]> source.dussan.org Git - redmine.git/commitdiff
Merged r21834 and r21852 to 5.0-stable (#37369).
authorMarius Balteanu <marius.balteanu@zitec.com>
Mon, 26 Sep 2022 22:41:49 +0000 (22:41 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Mon, 26 Sep 2022 22:41:49 +0000 (22:41 +0000)
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@21853 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/issues/bulk_edit.html.erb
test/system/inline_autocomplete_test.rb

index a49617aab82be314eadd0f8c72123e616a56bcb6..4fe457b32eb5f6561198d62c5f99f9e5c768ea81 100644 (file)
 %>
 <%= wikitoolbar_for 'notes' %>
 
+<% if User.current.allowed_to?(:add_issue_watchers, nil, global: true)%>
+  <%= update_data_sources_for_auto_complete({users: watchers_autocomplete_for_mention_path(q: '', object_type: 'issue', object_id: @issues.map(&:id) )}) %>
+<% end %>
+
 <% if @safe_attributes.include?('private_notes') %>
   <label class="inline">
        <%= check_box_tag 'issue[private_notes]', 1, false %>
index 26a89b85d55e9c87dc0abad02ee410fc15a6b5d1..70c462a4d24f5a6ef5adc52885a95b95edbe109e 100644 (file)
@@ -186,4 +186,19 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase
     end
 
   end
+
+  def test_inline_autocomplete_for_users_on_issues_bulk_edit_show_autocomplete
+    log_user('jsmith', 'jsmith')
+    visit '/issues/bulk_edit?ids[]=1&ids[]=2'
+
+    find('#notes').click
+    fill_in 'notes', :with => '@lopper'
+
+    within('.tribute-container') do
+      assert page.has_text? 'Dave Lopper'
+      first('li').click
+    end
+
+    assert_equal '@dlopper ', find('#notes').value
+  end
 end