From 987cf0a6371cf0282721e0ecce65a1f8531e1ecf Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Mon, 14 Sep 2015 15:34:10 +0200 Subject: [PATCH] Fix include statement --- app/views/my_projects_overviews/blocks/_spent_time.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/my_projects_overviews/blocks/_spent_time.html.erb b/app/views/my_projects_overviews/blocks/_spent_time.html.erb index 24f96f2cbc..9fa13a7e82 100644 --- a/app/views/my_projects_overviews/blocks/_spent_time.html.erb +++ b/app/views/my_projects_overviews/blocks/_spent_time.html.erb @@ -27,14 +27,14 @@ See doc/COPYRIGHT.md for more details. <% entries = TimeEntry - .where(["#{TimeEntry.table_name}.user_id = ? AND #{TimeEntry.table_name}.spent_on BETWEEN ? AND ?", @user.id, Date.today - 6, Date.today]) .includes([:activity, :project, {:work_package => [:type, :status]}]) + .where(["#{TimeEntry.table_name}.user_id = ? AND #{TimeEntry.table_name}.spent_on BETWEEN ? AND ?", @user.id, Date.today - 6, Date.today]).references(:projects) .order("#{TimeEntry.table_name}.spent_on DESC, #{Project.table_name}.name ASC, #{Type.table_name}.position ASC, #{WorkPackage.table_name}.id ASC") entries_by_day = entries.group_by(&:spent_on) %>
-

<%= l(:label_total) %>: <%= html_hours("%.2f" % entries.sum(&:hours).to_f) %>

+

<%= l(:label_total) %>: <%= html_hours("%.2f" % entries.sum(:hours).to_f) %>

<% if entries.any? %>