diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-17 16:46:05 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-10-17 16:46:05 +0000 |
commit | a8b7aa82990d6a66a25affa1454b3d8a0b6cd84c (patch) | |
tree | bba7d78513b85e22dc25a53042ffbe48813b5bf1 /app/models | |
parent | 2140c490421261b4f8514792d1b6c5f69453bf6d (diff) | |
download | redmine-a8b7aa82990d6a66a25affa1454b3d8a0b6cd84c.tar.gz redmine-a8b7aa82990d6a66a25affa1454b3d8a0b6cd84c.zip |
code cleanup: rubocop: fix Layout/CaseIndentation in app/models/issue_query.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18728 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/issue_query.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 8c37be05f..348845a43 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -614,8 +614,8 @@ class IssueQuery < Query relation_type = relation_options[:reverse] || relation_type join_column, target_join_column = target_join_column, join_column end - - sql = case operator + sql = + case operator when "*", "!*" op = (operator == "*" ? 'IN' : 'NOT IN') "#{Issue.table_name}.id #{op} (SELECT DISTINCT #{IssueRelation.table_name}.#{join_column} FROM #{IssueRelation.table_name} WHERE #{IssueRelation.table_name}.relation_type = '#{self.class.connection.quote_string(relation_type)}')" @@ -630,7 +630,6 @@ class IssueQuery < Query op = (operator == "!o" ? 'NOT IN' : 'IN') "#{Issue.table_name}.id #{op} (SELECT DISTINCT #{IssueRelation.table_name}.#{join_column} FROM #{IssueRelation.table_name}, #{Issue.table_name} relissues WHERE #{IssueRelation.table_name}.relation_type = '#{self.class.connection.quote_string(relation_type)}' AND #{IssueRelation.table_name}.#{target_join_column} = relissues.id AND relissues.status_id IN (SELECT id FROM #{IssueStatus.table_name} WHERE is_closed=#{self.class.connection.quoted_false}))" end - if relation_options[:sym] == field && !options[:reverse] sqls = [sql, sql_for_relations(field, operator, value, :reverse => true)] sql = sqls.join(["!", "!*", "!p", '!o'].include?(operator) ? " AND " : " OR ") |