##// END OF EJS Templates
Prevent sqlserver adapter from breaking the sub-query (#12713)....
Jean-Philippe Lang -
r10886:9a66463ff846
parent child
Show More
@@ -209,7 +209,7 class IssueQuery < Query
209 index = (index ? index + 1 : -1)
209 index = (index ? index + 1 : -1)
210 # insert the column after estimated_hours or at the end
210 # insert the column after estimated_hours or at the end
211 @available_columns.insert index, QueryColumn.new(:spent_hours,
211 @available_columns.insert index, QueryColumn.new(:spent_hours,
212 :sortable => "(SELECT COALESCE(SUM(hours), 0) FROM #{TimeEntry.table_name} WHERE #{TimeEntry.table_name}.issue_id = #{Issue.table_name}.id)",
212 :sortable => "COALESCE((SELECT SUM(hours) FROM #{TimeEntry.table_name} WHERE #{TimeEntry.table_name}.issue_id = #{Issue.table_name}.id), 0)",
213 :default_order => 'desc',
213 :default_order => 'desc',
214 :caption => :label_spent_time
214 :caption => :label_spent_time
215 )
215 )
General Comments 0
You need to be logged in to leave comments. Login now