@@ -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 => " |
|
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