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

active tasks are sorted last in list view #231

Open
nblock opened this issue Mar 7, 2020 · 3 comments
Open

active tasks are sorted last in list view #231

nblock opened this issue Mar 7, 2020 · 3 comments

Comments

@nblock
Copy link
Contributor

nblock commented Mar 7, 2020

Active tasks are sorted last when the list view is selected.

Running vit list:

ID  Active  Age  Project  Description  Urg                                                                                                                                                                                                     
1           1m            a            0.00
3   1m      1m   foo      c            5.00
2   1m      1m            b            4.00

Running task:

ID Active Age  Project Description Urg 
 2 3min   3min         b              4
 3 3min   3min foo     c              5
 1        3min         a              0
  • Reproduce by running scripts/generate-dummy-install.sh
  • Version: 41d046e
@thehunmonkgroup
Copy link
Member

Can you please provide me your output for task _show | grep ^report.list.sort

Mine is below:

[:~] $ task _show | grep ^report.list.sort
report.list.sort=start-,due+,project+,urgency-

@nblock
Copy link
Contributor Author

nblock commented Apr 18, 2020

$ task _show | grep "^report.list.sort"
report.list.sort=start-,due+,project+,urgency-

@thehunmonkgroup
Copy link
Member

So we have the same sorting on that report, which I guess is the default provided by TaskWarrior.

I'm not even sure TaskWarrior is processing all of those filters in a sensible manner -- why is ID 2 before ID 3?

Pretty sure what is happening on the VIT side has to do with how blank values are handled. Have a look at the sort method in vit/task_list.py -- it's currently a simple algorithm that weights non-empty columns above empty ones, which seems sensible for most cases.

I think it might be a bit of a nightmare to provide custom logic for all column types, but I'm open to ideas.

Lastly, the TaskWarrior devs have made it crystal clear that their exports will never contain any sorting data, and I'm not sure it's worth the overhead to chase TaskWarrior's sorting logic in all cases -- VIT may just be different sometimes.

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