##// END OF EJS Templates
"Total estimated time" should be inserted after "Estimated time" (#20733)....
Jean-Philippe Lang -
r14220:d1d1f81e9468
parent child
Show More
@@ -262,10 +262,9 class IssueQuery < Query
262 262 ).visible.collect {|cf| QueryCustomFieldColumn.new(cf) }
263 263
264 264 if User.current.allowed_to?(:view_time_entries, project, :global => true)
265 index = nil
266 @available_columns.each_with_index {|column, i| index = i if column.name == :estimated_hours}
265 index = @available_columns.find_index {|column| column.name == :total_estimated_hours}
267 266 index = (index ? index + 1 : -1)
268 # insert the column after estimated_hours or at the end
267 # insert the column after total_estimated_hours or at the end
269 268 @available_columns.insert index, QueryColumn.new(:spent_hours,
270 269 :sortable => "COALESCE((SELECT SUM(hours) FROM #{TimeEntry.table_name} WHERE #{TimeEntry.table_name}.issue_id = #{Issue.table_name}.id), 0)",
271 270 :default_order => 'desc',
General Comments 0
You need to be logged in to leave comments. Login now