diff options
author | Go MAEDA <maeda@farend.jp> | 2024-09-01 05:15:09 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2024-09-01 05:15:09 +0000 |
commit | ab4eac416ae60fa0fa75dba914eb642d3622faa7 (patch) | |
tree | 7c08bae2d572dc79f9509b1f34d09d83e351b639 /app | |
parent | e26ae4f5beb92e2b053ed25eb2b44ca691a97edc (diff) | |
download | redmine-ab4eac416ae60fa0fa75dba914eb642d3622faa7.tar.gz redmine-ab4eac416ae60fa0fa75dba914eb642d3622faa7.zip |
"##" syntax auto complete does not work (#41096).
Patch by Katsuya HIDAKA (user:hidakatsuya).
git-svn-id: https://svn.redmine.org/redmine/trunk@23008 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/application.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 320efd263..ba77034fb 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -1167,6 +1167,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); }); |