TaskLite
TaskLite copied to clipboard
Potential Bug in listReady
I'm looking at the source code to better understand some things, and looking and listReady, the query's where clause is (https://github.com/ad-si/TaskLite/blob/e2bb3adbc822cc322d9c4627be289bcefcb58ff2/tasklite-core/source/Lib.hs#L1688):
\where (ready_utc is null \
\or (ready_utc is not null and ready_utc < datetime('now'))) \
\and closed_utc is null \
whereas the derived state of IsReady has the following (https://github.com/ad-si/TaskLite/blob/e2bb3adbc822cc322d9c4627be289bcefcb58ff2/tasklite-core/source/Task.hs#L179):
IsReady -> "(awake_utc is null or awake_utc < datetime('now')) \
\and ready_utc < datetime('now') \
\and closed_utc is null"
I think the derived option contains the appropriate query. I can work on a PR that uses the IsReady Text as part of the listReady query if this is an actual bug.
Actually, pretty much all derived states are incorrect at the moment 😅. I was still working on how they should relate conceptually. This is the current progress: https://tasklite.org/concepts.html Feedback would be much appreciated! Once this is approved we can start fixing the code.
Using the derived state text as part of the query is a good point!
Thanks. I've gone through the concepts page and here are some questions I have:
- Will recurring/repeated tasks will have their tags and notes also duplicated?
- What's the difference between a task being awake and a task being ready? The use case I have in mind uses both as the same. Where if I have a meeting at 9am, I can either set the awake_utc or ready_utc to that time and they'll just work similarly.
Looking through the ready state from the concepts page:
- if (waiting_utc < now or waiting_utc is not set) and (review_utc < now and review_utc is not set) the task should be ready, otherwise its not ready I think.