mirror of
https://github.com/redmine/redmine.git
synced 2026-05-07 13:27:40 +02:00
Backport r23008 from trunk to 5.0-stable (#41096).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@23015 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1161,6 +1161,12 @@ function inlineAutoComplete(element) {
|
||||
if (event.target.type === 'text' && $(element).attr('autocomplete') != 'off') {
|
||||
$(element).attr('autocomplete', 'off');
|
||||
}
|
||||
// When triggered with text starting with "##", like "##a", the search term will become "#a",
|
||||
// causing the SQL query to fail in finding issues with "a" in the subject.
|
||||
// To avoid this, remove the first "#" from the search term.
|
||||
if (text) {
|
||||
text = text.replace(/^#/, '');
|
||||
}
|
||||
remoteSearch(getDataSource('issues') + encodeURIComponent(text), function (issues) {
|
||||
return cb(issues);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user