diff options
author | Go MAEDA <maeda@farend.jp> | 2024-09-05 02:38:37 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2024-09-05 02:38:37 +0000 |
commit | 364d9310a9e27fcbd8a74e1f9e0c4a4d7a1d8af9 (patch) | |
tree | 9b9a53f5879d5f960af9648b28b5679e78f2f06c | |
parent | 39a53b85d95c0069bb4aff1acaed111325008291 (diff) | |
download | redmine-364d9310a9e27fcbd8a74e1f9e0c4a4d7a1d8af9.tar.gz redmine-364d9310a9e27fcbd8a74e1f9e0c4a4d7a1d8af9.zip |
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
-rw-r--r-- | public/javascripts/application.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js index c27be49ab..4db005b93 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -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); }); |