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

"Someday" should be sorted at the end (after tasks with no duedate) when sorting by end date #859

Closed
Gert-dev opened this issue Mar 8, 2022 · 3 comments · Fixed by #894
Assignees
Labels
bug low-hanging-fruit "Easy picks" suitable for new contributors to tackle priority:medium reproducible-in-git Issues that affect the current dev version

Comments

@Gert-dev
Copy link

Gert-dev commented Mar 8, 2022

Hi

Thanks for maintaining this application. I've been using it with satisfaction for quite some time, and wanted to ask a question - possibly suggest an improvement - around the ordering of tasks when sorting by the end date column.

Currently, when sorting tasks in an ascending fashion by end date, you see:

  1. Task A that ended five days ago.
  2. Task B that needs to be done tomorrow
  3. Task C that needs to be done at date Z in the future, but within the current year.
  4. Task D with "someday" as end date.
  5. Task E that needs to be done at date Y in the future, but not this year.
  6. Task F with no end date set.

For example:

afbeelding

Two things strike me as somewhat odd here: one is that apparently "someday" is seen as "somewhere within the current year", whilst I thought the purpose of it was "it needs to be done at some point, but it has no required end date, so don't show it in the Open view either", implying low priority - in the screenshot, the task due by 2023 is sorted after "someday" tasks, though.

The other thing is that I'm wondering if it would make more sense to always sort "someday" tasks at the far bottom, and sort the tasks with no end date before them. The reasoning is that tasks without end date might still need to be done in the near future ("soonish"), whilst for "someday" tasks priority doesn't matter - in a sense, tasks with "someday" have an end date that is later than tasks without an end date. Currently, if you have a lot of tasks "someday", they are all sorted before tasks that might be more "urgent", pushing them down.

There may be a reasoning for the current sorting, though, and maybe it just comes down to preference.

Thanks!

@nekohayo nekohayo added bug low-hanging-fruit "Easy picks" suitable for new contributors to tackle priority:medium reproducible-in-git Issues that affect the current dev version labels Mar 8, 2022
@Neui
Copy link
Contributor

Neui commented Mar 8, 2022

About the current sorting, it seems for "someday" for comparing dates it is turned into a date where it is a year from now (aka today):

gtg/GTG/core/dates.py

Lines 201 to 203 in 4dd1648

now = datetime.now()
delta_days = {SOON: 15, SOMEDAY: 365, NODATE: 9999}
gtg_date = Date(now + timedelta(delta_days[self.dt_value]))

@nekohayo nekohayo changed the title Order when sorting by end date "Someday" should be sorted at the end (after tasks with no duedate) when sorting by end date Mar 8, 2022
@nekohayo
Copy link
Member

nekohayo commented Mar 8, 2022

I wholeheartedly agree that this sorting doesn't make sense. This is just a wild guess, but this might historically have something to do with how sorting the GtkTreeview works, and if so, it might be something for @diegogangl and @jaesivsm to consider as part of #737 / New Core / GTK4 / new views ... so many moving pieces interacting with each other there!

Surprised we didn't already have a ticket for this issue here, I probably never noticed because I spend my time in "Actionable" view so much, which hides the "someday" tasks.

@diegogangl
Copy link
Contributor

We can compare fuzzy dates directly in the new filter models in Gtk4, so we can get away from the limitations of using days for fuzzies.

kocio-pl added a commit to kocio-pl/gtg that referenced this issue Mar 10, 2022
Related to getting-things-gnome#859

Current sorting in Actionable view starts with no date tasks and most urgent dates go to the end, which means `today` might not be even visible. This simple patch reverses the sorting order of due date, so it starts with `today` tasks.
diegogangl added a commit to diegogangl/gtg that referenced this issue Jul 16, 2022
diegogangl added a commit to diegogangl/gtg that referenced this issue Aug 4, 2022
diegogangl added a commit to diegogangl/gtg that referenced this issue Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug low-hanging-fruit "Easy picks" suitable for new contributors to tackle priority:medium reproducible-in-git Issues that affect the current dev version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants