Skip to content

Commit 2a60a7b

Browse files
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
1 parent 1d02d8e commit 2a60a7b

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

app/helpers/application_helper.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1831,9 +1831,7 @@ def heads_for_auto_complete(project)
18311831

18321832
def update_data_sources_for_auto_complete(data_sources)
18331833
javascript_tag(
1834-
"const currentDataSources = rm.AutoComplete.dataSources;" \
1835-
"const newDataSources = JSON.parse('#{data_sources.to_json}'); " \
1836-
"rm.AutoComplete.dataSources = Object.assign(currentDataSources, newDataSources);"
1834+
"rm.AutoComplete.dataSources = Object.assign(rm.AutoComplete.dataSources, JSON.parse('#{data_sources.to_json}'));"
18371835
)
18381836
end
18391837

test/system/inline_autocomplete_test.rb

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,26 @@ def test_inline_autocomplete_for_issues_should_escape_html_elements
165165
assert page.has_text? "Bug ##{issue.id}: This issue has a <select> element"
166166
end
167167
end
168+
169+
def test_inline_autocomplete_for_users_should_work_after_status_change
170+
log_user('jsmith', 'jsmith')
171+
visit '/issues/1/edit'
172+
173+
find('#issue_notes').click
174+
fill_in 'issue[notes]', :with => '@lopper'
175+
176+
within('.tribute-container') do
177+
assert page.has_text? "Dave Lopper"
178+
end
179+
180+
page.find('#issue_status_id').select('Feedback')
181+
182+
find('#issue_notes').click
183+
fill_in 'issue[notes]', :with => '@lopper'
184+
185+
within('.tribute-container') do
186+
assert page.has_text? "Dave Lopper"
187+
end
188+
189+
end
168190
end

0 commit comments

Comments
 (0)