summaryrefslogtreecommitdiffstats
path: root/app/models/issue_query.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-07 03:42:01 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-07 03:42:01 +0000
commitb7a2acd45d4261569191b39c20261ab0efeb7180 (patch)
treedd174c80cf470197df0154da80787b485f92ef75 /app/models/issue_query.rb
parentd4ec592f67593acd6598ef4947481aa89b6b85c5 (diff)
downloadredmine-b7a2acd45d4261569191b39c20261ab0efeb7180.tar.gz
redmine-b7a2acd45d4261569191b39c20261ab0efeb7180.zip
cleanup: rubocop: fix Layout/AlignArguments in IssueQuery available_columns variable
git-svn-id: http://svn.redmine.org/redmine/trunk@18931 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_query.rb')
-rw-r--r--app/models/issue_query.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb
index cd11da343..c33caefeb 100644
--- a/app/models/issue_query.rb
+++ b/app/models/issue_query.rb
@@ -39,7 +39,8 @@ class IssueQuery < Query
QueryColumn.new(:start_date, :sortable => "#{Issue.table_name}.start_date", :groupable => true),
QueryColumn.new(:due_date, :sortable => "#{Issue.table_name}.due_date", :groupable => true),
QueryColumn.new(:estimated_hours, :sortable => "#{Issue.table_name}.estimated_hours", :totalable => true),
- QueryColumn.new(:total_estimated_hours,
+ QueryColumn.new(
+ :total_estimated_hours,
:sortable => -> {
"COALESCE((SELECT SUM(estimated_hours) FROM #{Issue.table_name} subtasks" +
" WHERE #{Issue.visible_condition(User.current).gsub(/\bissues\b/, 'subtasks')} AND subtasks.root_id = #{Issue.table_name}.root_id AND subtasks.lft >= #{Issue.table_name}.lft AND subtasks.rgt <= #{Issue.table_name}.rgt), 0)"