##// END OF EJS Templates
Fixed: time report doesn't take account of the project for time calculations...
Jean-Philippe Lang -
r572:184be9d0e3af
parent child
Show More
@@ -64,7 +64,8 class TimelogController < ApplicationController
64 64
65 65 sql = "SELECT #{sql_select}, tyear, tmonth, tweek, SUM(hours) AS hours"
66 66 sql << " FROM #{TimeEntry.table_name} LEFT JOIN #{Issue.table_name} ON #{TimeEntry.table_name}.issue_id = #{Issue.table_name}.id"
67 sql << " WHERE spent_on BETWEEN '%s' AND '%s'" % [ActiveRecord::Base.connection.quoted_date(@date_from.to_time), ActiveRecord::Base.connection.quoted_date(@date_to.to_time)]
67 sql << " WHERE #{TimeEntry.table_name}.project_id = %s" % @project.id
68 sql << " AND spent_on BETWEEN '%s' AND '%s'" % [ActiveRecord::Base.connection.quoted_date(@date_from.to_time), ActiveRecord::Base.connection.quoted_date(@date_to.to_time)]
68 69 sql << " GROUP BY #{sql_group_by}, tyear, tmonth, tweek"
69 70
70 71 @hours = ActiveRecord::Base.connection.select_all(sql)
General Comments 0
You need to be logged in to leave comments. Login now