summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-03-10 19:42:45 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-03-10 19:42:45 +0000
commit6e356071dd3baa85e842ce91a391798409a2ee21 (patch)
tree0bfe9aaabd574e31113665542d2363afe75259d0 /app/helpers
parent840881c76a5d50af882c2b2badd1b9182656fce0 (diff)
downloadredmine-6e356071dd3baa85e842ce91a391798409a2ee21.tar.gz
redmine-6e356071dd3baa85e842ce91a391798409a2ee21.zip
Fixed that spent time on my page does not include entries without issue (#19320).
git-svn-id: http://svn.redmine.org/redmine/trunk@14071 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/my_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/my_helper.rb b/app/helpers/my_helper.rb
index fdb51d61c..0f4f7b835 100644
--- a/app/helpers/my_helper.rb
+++ b/app/helpers/my_helper.rb
@@ -68,7 +68,9 @@ module MyHelper
def timelog_items
TimeEntry.
where("#{TimeEntry.table_name}.user_id = ? AND #{TimeEntry.table_name}.spent_on BETWEEN ? AND ?", User.current.id, Date.today - 6, Date.today).
- joins(:activity, :project, {:issue => [:tracker, :status]}).
+ joins(:activity, :project).
+ references(:issue => [:tracker, :status]).
+ includes(:issue => [:tracker, :status]).
order("#{TimeEntry.table_name}.spent_on DESC, #{Project.table_name}.name ASC, #{Tracker.table_name}.position ASC, #{Issue.table_name}.id ASC").
to_a
end