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

Use task id:… op and task uuid:… op for robustness #79

Open
liskin opened this issue Jul 7, 2020 · 1 comment
Open

Use task id:… op and task uuid:… op for robustness #79

liskin opened this issue Jul 7, 2020 · 1 comment

Comments

@liskin
Copy link

liskin commented Jul 7, 2020

taskwiki tests uncovered that some UUID aren't parsed as UUIDs:

$ task 0003717d-b325-4fd1-8367-7492996250df export
Cannot subtract strings
$ task 0000000d-000a-0000-0000-000000000000 export
Cannot subtract strings
$ task 0000000d-0000-0000-0000-000000000000 export
The expression could not be evaluated.

This was reported to taskwarrior as GothenburgBitFactory/taskwarrior#2306 but looking at the project activity I'm afraid it might stay unfixed for a while, and I'm not feeling confident enough to reorder the lexer myself. Therefore I suggest that tasklib use a more explicit form of filter to avoid hitting this bug.

So I'd suggest to alter https://github.com/robgolding/tasklib/blob/670836f56f8072cae112c4d1bf1b872472150b50/tasklib/backends.py#L408 (and a few other places) to include an explicit uuid: or id: prefix to help the taskwarrior parser do the correct thing.

@robgolding
Copy link
Collaborator

Thanks for the report @liskin! Your suggestion certainly seems sensible, if you're feeling up to submitting a PR that would be great and I'll review it ASAP. Otherwise it maybe a little while before this gets implemented 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants