Wrong order of multi-day facts in Overview
The Overview displays facts ordered by date in the descending order and by time in descending order. Additionally, the facts from previous day seem to be tacked to the end of the list instead of the beginning.
For example, when I track the following facts:
- fact 1 from 09:00 Saturday to 15:00 Saturday
- fact 2 from 21:00 Saturday to 03:30 Sunday
- fact 3 from 03:30 Sunday to 13:00 Sunday
- fact 4 from 22:30 Sunday to 00:30 Monday
they are displayed in this order:
Sunday
03:30–13:00 fact 3
22:30–00:30 fact 4
21:00–03:30 fact 2
Saturday
09:00–15:00 fact 1
while the order should be like this:
Saturday
09:00–15:00 fact 1
21:00–03:30 fact 2
Sunday
03:30–13:00 fact 3
22:30–00:30 fact 4
Thank you for raising this. As you say, this report really contains several issues:
- Overview: Days ordering and
- Oveview: Facts-per-day ordering
- Ordering of facts that span multiple days
1 and 2 are actually not bugs. This is the intended ordering as per implementation. When I implemented the feature I opted for an ordering that suited my usecase :) However, I think it is easy to see that one prefers a different ordering of cause. Instead of this bug issue a new feature request should be opened asking for a way to provide preference settings that allows users to set the ordering scheme to their needs/desires.
- This needs to be investigated an may very well be a valid bug. Can you check what you
day_endsetting is for this testcase?
If ORDER BY DATE(start) DESC, TIME(start) ASC is intended, this issue is indeed about the ordering of multi-day facts.
The correct ordering should be
Sunday
21:00–03:30 fact 2
03:30–13:00 fact 3
22:30–00:30 fact 4
Saturday
09:00–15:00 fact 1
or
Sunday
03:30–13:00 fact 3
22:30–00:30 fact 4
Saturday
09:00–15:00 fact 1
21:00–03:30 fact 2
It does not really matter, as long as the order is as intended. For simplicity we can leave it a part of the initial day. It probably makes the more sense than placing it to the day that the fact occupies the most anyway – imagine a fact starting on Monday at 23:00 and ending on Thursday at 1:00.
I often work at night so I have 05:30:00 as the day end but if the fact crosses the day_end, we will still have to decide as mentioned above. Let us keep it simple and only use day_end for starting a fact.
I will open a separate issue for changing the ordering strategy.