summaryrefslogtreecommitdiffstats
path: root/app/models/issue_query.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2023-04-05 13:52:53 +0000
committerGo MAEDA <maeda@farend.jp>2023-04-05 13:52:53 +0000
commit27b8f57fd8c7e8b1279b483128edbdcc9723be49 (patch)
tree1dceb10173d766593a52494dd502dd9ba8e43b4d /app/models/issue_query.rb
parent5e1b7b027fe5000f92b0daa3e40f76b05ad042c6 (diff)
downloadredmine-27b8f57fd8c7e8b1279b483128edbdcc9723be49.tar.gz
redmine-27b8f57fd8c7e8b1279b483128edbdcc9723be49.zip
Fix a bug the "doesn't contain" operator returns no issues if the search finds no issues (#38402).
Patch by Holger Just. git-svn-id: https://svn.redmine.org/redmine/trunk@22168 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_query.rb')
-rw-r--r--app/models/issue_query.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb
index 1c60c6b61..e45548121 100644
--- a/app/models/issue_query.rb
+++ b/app/models/issue_query.rb
@@ -799,7 +799,7 @@ class IssueQuery < Query
sw = operator == '!~' ? 'NOT' : ''
"#{Issue.table_name}.id #{sw} IN (#{ids.join(',')})"
else
- '1=0'
+ operator == '!~' ? '1=1' : '1=0'
end
end