From 167c8d1b998288e32c1e576eae3bebb7cbc9cb34 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Sat, 22 Jun 2013 12:58:23 +0200 Subject: [PATCH] Also order unbilled tasks descending by date in the time_entries view --- stoptime.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stoptime.rb b/stoptime.rb index c4f8a26..6248cda 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -1185,7 +1185,9 @@ module StopTime::Controllers if @input["show"] == "all" @time_entries = TimeEntry.all(:order => "start DESC") else - @time_entries = TimeEntry.joins(:task).where("stoptime_tasks.invoice_id" => nil) + @time_entries = TimeEntry.joins(:task)\ + .where("stoptime_tasks.invoice_id" => nil)\ + .order("start DESC") end @time_entries.each do |te| @input["bill_#{te.id}"] = true if te.bill?