diff options
author | Go MAEDA <maeda@farend.jp> | 2023-05-01 14:33:22 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2023-05-01 14:33:22 +0000 |
commit | 5352225a8ca5bab25a51c3f4169a98cda364fc86 (patch) | |
tree | 09d132f343df5f1f8482f757f3db004c0247af9d /app | |
parent | 88d4fcd270c28398beea1cd2b3080373cc3c231f (diff) | |
download | redmine-5352225a8ca5bab25a51c3f4169a98cda364fc86.tar.gz redmine-5352225a8ca5bab25a51c3f4169a98cda364fc86.zip |
Make the "Any searchable text" filter search only open issues when the status filter is set to "open" (#38402).
git-svn-id: https://svn.redmine.org/redmine/trunk@22221 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/issue_query.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 94d753603..e573f8782 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -805,8 +805,11 @@ class IssueQuery < Query when '*~', '!~' then false end + is_open_issues = has_filter?('status_id') && operator_for('status_id') == 'o' + fetcher = Redmine::Search::Fetcher.new( - question, User.current, ['issue'], projects, all_words: is_all_words, attachments: '0' + question, User.current, ['issue'], projects, + all_words: is_all_words, open_issues: is_open_issues, attachments: '0' ) ids = fetcher.result_ids.map(&:last) if ids.present? |