diff options
author | Go MAEDA <maeda@farend.jp> | 2019-03-07 08:05:03 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-03-07 08:05:03 +0000 |
commit | bbacbd3353ee6a5cec83dd5f0b7e67dba027c831 (patch) | |
tree | 4f095d3de6fa215135599140ef6d4f0eafc1592a /app/models/issue_query.rb | |
parent | 7b5131a229b3084c1bc99ecc04b8b3ee006c0c20 (diff) | |
download | redmine-bbacbd3353ee6a5cec83dd5f0b7e67dba027c831.tar.gz redmine-bbacbd3353ee6a5cec83dd5f0b7e67dba027c831.zip |
"Last updated by" filter causes an SQL error with MariaDB (#30367).
Patch by Pavel Rosický.
git-svn-id: http://svn.redmine.org/redmine/trunk@17933 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_query.rb')
-rw-r--r-- | app/models/issue_query.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index c13a29104..85a97806a 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)}))" |