Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong order of multi-day facts in Overview #209

Open
jtojnar opened this issue Jul 9, 2017 · 2 comments
Open

Wrong order of multi-day facts in Overview #209

jtojnar opened this issue Jul 9, 2017 · 2 comments

Comments

@jtojnar
Copy link
Member

jtojnar commented Jul 9, 2017

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
@jtojnar jtojnar added the Bug label Jul 9, 2017
@elbenfreund
Copy link
Collaborator

Thank you for raising this. As you say, this report really contains several issues:

  1. Overview: Days ordering and
  2. Oveview: Facts-per-day ordering
  3. 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.

  1. This needs to be investigated an may very well be a valid bug. Can you check what you day_end setting is for this testcase?

@jtojnar
Copy link
Member Author

jtojnar commented Sep 15, 2017

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.

@jtojnar jtojnar changed the title Wrong order of facts in Overview Wrong order of multi-day facts in Overview Sep 15, 2017
@jtojnar jtojnar added this to the 0.12.0 milestone Sep 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants