summaryrefslogtreecommitdiffstats
path: root/app/models/issue_query.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2024-01-11 11:27:25 +0000
committerGo MAEDA <maeda@farend.jp>2024-01-11 11:27:25 +0000
commit5b77092be4936f36c77f495b08af3976d2ca4774 (patch)
tree9c23d4415e8a9c7470747a9136048e3b2d3b2294 /app/models/issue_query.rb
parentb57a3a187c78647499d490a99d8f493dbf5e6c15 (diff)
downloadredmine-5b77092be4936f36c77f495b08af3976d2ca4774.tar.gz
redmine-5b77092be4936f36c77f495b08af3976d2ca4774.zip
Replace regular expression matches with String#start_with? / end_with? (#40010).
Patch by Go MAEDA (@maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@22605 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 7c1027ad3..4905b1cfb 100644
--- a/app/models/issue_query.rb
+++ b/app/models/issue_query.rb
@@ -481,7 +481,7 @@ class IssueQuery < Query
" WHERE #{Journal.table_name}.journalized_type='Issue' AND #{Journal.table_name}.journalized_id=#{Issue.table_name}.id" +
" AND (#{sql_for_field field, operator.delete_prefix('!'), value, Journal.table_name, 'notes'})" +
" AND (#{Journal.visible_notes_condition(User.current, :skip_pre_condition => true)})"
- "#{/^!/.match?(operator) ? "NOT EXISTS" : "EXISTS"} (#{subquery})"
+ "#{operator.start_with?('!') ? "NOT EXISTS" : "EXISTS"} (#{subquery})"
end
def sql_for_updated_by_field(field, operator, value)