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

'open' command shows closed task #40

Closed jdietrch closed 3 years ago

jdietrch commented 3 years ago

I start with an empty database, add a task, view it with tasklite open, and then mark it done. However, after that when I run tasklite open again, it still shows the task, and running tasklite info shows that the task is "Closed and Done".

Maybe I'm misunderstanding something, but the help for tasklite open says "List all open tasks by priority desc", which makes me think it shouldn't show closed tasks.

The following demonstrates this issue:

jdietrch@arcturus:~$ tasklite
No tasks available. Run `tasklite help` to learn how to create tasks.
jdietrch@arcturus:~$ tasklite add Mow the lawn
πŸ†• Added task "Mow the lawn" with id "01eper15t77xcsq9078yv66h11"
jdietrch@arcturus:~$ tasklite open
Id   Prio  Opened UTC  Body
h11   0    2020-11-06  Mow the lawn

jdietrch@arcturus:~$ tasklite do h11
βœ… Finished task "Mow the lawn" with id "01eper15t77xcsq9078yv66h11"
jdietrch@arcturus:~$ tasklite open
Id   Prio  Opened UTC  Body
h11   0    2020-11-06  Mow the lawn

jdietrch@arcturus:~$ tasklite info h11

Mow the lawn

   State: Closed and Done
Priority: 0.0
    ULID: 01eper15t77xcsq9078yv66h11

πŸ†•  Created   2020-11-06 12:20:51
       ⬇
✏️   Modified  2020-11-06 12:20:51

User: jdietrch

jdietrch@arcturus:~$
ad-si commented 3 years ago

Ugh, that was a nasty one. I forgot to recreate SQL triggers after migrating a table. This only showed when creating a database from scratch, so I missed it. I should really extend my test suite πŸ™ˆ. Thanks a lot for finding this!

Fixed in 03073fb