diff options
Diffstat (limited to 'app/models/issue_query.rb')
-rw-r--r-- | app/models/issue_query.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 68ce1c104..cd363b5c8 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -791,8 +791,14 @@ class IssueQuery < Query projects = nil end + is_all_words = + case operator + when '~' then true + when '|~', '!~' then false + end + fetcher = Redmine::Search::Fetcher.new( - question, User.current, ['issue'], projects, all_words: (operator != '!~'), attachments: '0' + question, User.current, ['issue'], projects, all_words: is_all_words, attachments: '0' ) ids = fetcher.result_ids.map(&:last) if ids.present? |