##// END OF EJS Templates
Tests broken with ruby1.8.6 (#9751)....
Jean-Philippe Lang -
r8008:3976e2d15dd0
parent child
Show More
@@ -363,7 +363,8 class Query < ActiveRecord::Base
363 ).collect {|cf| QueryCustomFieldColumn.new(cf) }
363 ).collect {|cf| QueryCustomFieldColumn.new(cf) }
364
364
365 if User.current.allowed_to?(:view_time_entries, project, :global => true)
365 if User.current.allowed_to?(:view_time_entries, project, :global => true)
366 index = @available_columns.index {|column| column.name == :estimated_hours}
366 index = nil
367 @available_columns.each_with_index {|column, i| index = i if column.name == :estimated_hours}
367 index = (index ? index + 1 : -1)
368 index = (index ? index + 1 : -1)
368 # insert the column after estimated_hours or at the end
369 # insert the column after estimated_hours or at the end
369 @available_columns.insert index, QueryColumn.new(:spent_hours,
370 @available_columns.insert index, QueryColumn.new(:spent_hours,
General Comments 0
You need to be logged in to leave comments. Login now