ivan-lednev / obsidian-task-archiver

Archive completed tasks in your Obsidian vault (plus other org-mode-like features)
MIT License
109 stars 12 forks source link

Only archive done task if all its subtasks are done #36

Closed lebigot closed 1 year ago

lebigot commented 1 year ago

(Very useful plugin, thanks! :))

Currently, when a main task (e.g. "Revise class") is done and contains subtasks (e.g. "Check out PyTorch"), the "Archive… nested…" command archives it along with its subtasks even if they are not done.

Now, I realize that the main task could written as a bullet (instead of a checkbox), so as to prevent this, but this has some limitations:

  1. When archiving all the subtasks, the main task would remain in the list of tasks. This requires some manual cleaning.
  2. The main task might still be a task: for example, if "Revise class" is not fully done yet (maybe more subtasks should be added before we feel ready for the exam), it is better to have an empty checkbox to indicate this.

Overall, I don't see that one may want to archive any task if its subtasks are not all done, so I would suggest that "Archive… nested…" keep the main task until it is done along with all its subtasks.

ivan-lednev commented 1 year ago

Hello, @lebigot,

Thank you for your input! I added the option in 0.21.0.

lebigot commented 1 year ago

This worked perfectly, in my test. Thanks a lot for your reactivity!

Now I can sleep well, without fearing that some "Header task" gets deleted or archived before it's done. 😅