summaryrefslogtreecommitdiffstats
path: root/app/models/issue_query.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2023-04-16 08:02:30 +0000
committerGo MAEDA <maeda@farend.jp>2023-04-16 08:02:30 +0000
commit0f6507a607c10fbc971f4bb148594cb0de5c2e71 (patch)
tree49f2bfa1f04dfca60c2e60e1e26cf3d05db87156 /app/models/issue_query.rb
parent3c8b9535a38a2675d6f41ab34c6def38f98a7421 (diff)
downloadredmine-0f6507a607c10fbc971f4bb148594cb0de5c2e71.tar.gz
redmine-0f6507a607c10fbc971f4bb148594cb0de5c2e71.zip
Change the notation of "contains any of" filter operator to "*~" (#38435).
git-svn-id: https://svn.redmine.org/redmine/trunk@22197 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_query.rb')
-rw-r--r--app/models/issue_query.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb
index 2aa60fcea..5c66800f9 100644
--- a/app/models/issue_query.rb
+++ b/app/models/issue_query.rb
@@ -614,8 +614,8 @@ class IssueQuery < Query
when "*", "!*"
e = (operator == "*" ? "EXISTS" : "NOT EXISTS")
"#{e} (SELECT 1 FROM #{Attachment.table_name} a WHERE a.container_type = 'Issue' AND a.container_id = #{Issue.table_name}.id)"
- when "~", "!~", "|~"
- c = sql_contains("a.filename", value.first, :all_words => (operator != "|~"))
+ when "~", "!~", "*~"
+ c = sql_contains("a.filename", value.first, :all_words => (operator != "*~"))
e = (operator == "!~" ? "NOT EXISTS" : "EXISTS")
"#{e} (SELECT 1 FROM #{Attachment.table_name} a WHERE a.container_type = 'Issue' AND a.container_id = #{Issue.table_name}.id AND (#{c}))"
when "^", "$"
@@ -630,9 +630,9 @@ class IssueQuery < Query
case operator
when '*', '!*'
(operator == '*' ? cond_description : "NOT (#{cond_description})")
- when '~', '!~', '|~'
+ when '~', '!~', '*~'
(operator == '~' ? '' : "#{cond_description} AND ") +
- sql_contains('a.description', value.first, :match => (operator != '!~'), :all_words => (operator != '|~'))
+ sql_contains('a.description', value.first, :match => (operator != '!~'), :all_words => (operator != '*~'))
when '^', '$'
sql_contains('a.description', value.first, (operator == '^' ? :starts_with : :ends_with) => true)
else
@@ -794,7 +794,7 @@ class IssueQuery < Query
is_all_words =
case operator
when '~' then true
- when '|~', '!~' then false
+ when '*~', '!~' then false
end
fetcher = Redmine::Search::Fetcher.new(