]> source.dussan.org Git - redmine.git/commitdiff
Merged r17933 from trunk to 4.0-stable (#30367).
authorGo MAEDA <maeda@farend.jp>
Wed, 13 Mar 2019 15:24:33 +0000 (15:24 +0000)
committerGo MAEDA <maeda@farend.jp>
Wed, 13 Mar 2019 15:24:33 +0000 (15:24 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/4.0-stable@17940 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue_query.rb

index 9b9b87cc9f7479d6305164bc23a0f6673da05614..93a3468086775a03e0e53157a5e78b98dbb05071 100644 (file)
@@ -379,7 +379,7 @@ class IssueQuery < Query
     neg = (operator == '!' ? 'NOT' : '')
     subquery = "SELECT 1 FROM #{Journal.table_name} sj" +
       " WHERE sj.journalized_type='Issue' AND sj.journalized_id=#{Issue.table_name}.id AND (#{sql_for_field field, '=', value, 'sj', 'user_id'})" +
-      " AND sj.id = (SELECT MAX(#{Journal.table_name}.id) FROM #{Journal.table_name}" +
+      " AND sj.id IN (SELECT MAX(#{Journal.table_name}.id) FROM #{Journal.table_name}" +
       "   WHERE #{Journal.table_name}.journalized_type='Issue' AND #{Journal.table_name}.journalized_id=#{Issue.table_name}.id" +
       "   AND (#{Journal.visible_notes_condition(User.current, :skip_pre_condition => true)}))"