VladimirMarkelov / ttdl

TTDL - Terminal Todo List Manager
MIT License
209 stars 17 forks source link

task_done sets creation date of task #27

Closed thomasjfox closed 4 years ago

thomasjfox commented 4 years ago

Hello Vladimir,

I'm just playing around with ttdl and I'm not sure about the side effects of the "done" command. Consider a simple task list consisting of one task:

something

After running ./ttdl done 1, the content of todo.txt looks like:

$ cat todo.txt 
x 2020-06-20 something

If the idea was to set the done date of a task automatically, ttdl must also set a creation date. The format spec here https://github.com/todotxt/todo.txt says that the creation date must be set if the completion date is set.

Cheers, Thomas

VladimirMarkelov commented 4 years ago

Hello Thomas,

I'll check it out. Thanks for finding the issue.

VladimirMarkelov commented 4 years ago

It appeared an issue in the external library. I created a PR https://github.com/sanpii/todo-txt/pull/19 . When my PR is merged, I'll update TTDL.

thomasjfox commented 4 years ago

Thanks for taking care of this so fast.

A good workaround is to enable creation_date_auto = true in the ttdl.toml, then the creation date is always set. I enabled that anyway.

VladimirMarkelov commented 4 years ago

Yes. It is another way to fix. As for proper fix, we should wait until new version of the library is published. At this moment my PR is merged, but the version is still 2.0.0-rc1, so cargo update does not see this. I'll wait until the final 2.0.0 is published.

VladimirMarkelov commented 4 years ago

In 0.9.0 version I used the updated library, and the issue must be fixed