summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-03-13 15:24:33 +0000
committerGo MAEDA <maeda@farend.jp>2019-03-13 15:24:33 +0000
commit9dcfff5b36e93cf5bd23b0a68a0375bb5c9b5a35 (patch)
tree6d16616818d19c9776ca997afb7374b613919b86
parent24af62b16c4f3fecdd800eefe978125e2ca7b647 (diff)
downloadredmine-9dcfff5b36e93cf5bd23b0a68a0375bb5c9b5a35.tar.gz
redmine-9dcfff5b36e93cf5bd23b0a68a0375bb5c9b5a35.zip
Merged r17933 from trunk to 4.0-stable (#30367).
git-svn-id: http://svn.redmine.org/redmine/branches/4.0-stable@17940 e93f8b46-1217-0410-a6f0-8f06a7374b81
-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 9b9b87cc9..93a346808 100644
--- a/app/models/issue_query.rb
+++ b/app/models/issue_query.rb
@@ -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)}))"