1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-31 11:37:14 +00:00

Fix that mentions not working after issue status is changed (#36909).

git-svn-id: https://svn.redmine.org/redmine/trunk@21569 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu 2022-05-11 20:29:14 +00:00
parent 1d02d8ec0b
commit 2a60a7bd79
2 changed files with 23 additions and 3 deletions

View File

@ -1831,9 +1831,7 @@ module ApplicationHelper
def update_data_sources_for_auto_complete(data_sources)
javascript_tag(
"const currentDataSources = rm.AutoComplete.dataSources;" \
"const newDataSources = JSON.parse('#{data_sources.to_json}'); " \
"rm.AutoComplete.dataSources = Object.assign(currentDataSources, newDataSources);"
"rm.AutoComplete.dataSources = Object.assign(rm.AutoComplete.dataSources, JSON.parse('#{data_sources.to_json}'));"
)
end

View File

@ -165,4 +165,26 @@ class InlineAutocompleteSystemTest < ApplicationSystemTestCase
assert page.has_text? "Bug ##{issue.id}: This issue has a <select> element"
end
end
def test_inline_autocomplete_for_users_should_work_after_status_change
log_user('jsmith', 'jsmith')
visit '/issues/1/edit'
find('#issue_notes').click
fill_in 'issue[notes]', :with => '@lopper'
within('.tribute-container') do
assert page.has_text? "Dave Lopper"
end
page.find('#issue_status_id').select('Feedback')
find('#issue_notes').click
fill_in 'issue[notes]', :with => '@lopper'
within('.tribute-container') do
assert page.has_text? "Dave Lopper"
end
end
end