ad-si / TaskLite

The CLI task manager for power users
https://tasklite.org
GNU Affero General Public License v3.0
216 stars 12 forks source link

Potential Bug in listReady #37

Open jnduli opened 3 years ago

jnduli commented 3 years ago

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.

ad-si commented 3 years ago

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!

jnduli commented 3 years ago

Thanks. I've gone through the concepts page and here are some questions I have:

jnduli commented 3 years ago

Looking through the ready state from the concepts page: