GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit 1cb733bd authored by jplang's avatar jplang

Prevent sqlserver adapter from breaking the sub-query (#12713).

git-svn-id: https://svn.redmine.org/redmine/trunk@11116 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent df53d7bf
......@@ -209,7 +209,7 @@ class IssueQuery < Query
index = (index ? index + 1 : -1)
# insert the column after estimated_hours or at the end
@available_columns.insert index, QueryColumn.new(:spent_hours,
:sortable => "(SELECT COALESCE(SUM(hours), 0) FROM #{TimeEntry.table_name} WHERE #{TimeEntry.table_name}.issue_id = #{Issue.table_name}.id)",
:sortable => "COALESCE((SELECT SUM(hours) FROM #{TimeEntry.table_name} WHERE #{TimeEntry.table_name}.issue_id = #{Issue.table_name}.id), 0)",
:default_order => 'desc',
:caption => :label_spent_time
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment