Reputation: 1013
I have the following tasks in an org-mode file
* TODO [#A] Morning tasks [0/7]
:PROPERTIES:
:RESET_CHECK_BOXES: t
:END:
- [ ] Check Agenda
- [ ] Empty head
- [ ] Refile tasks
- [ ] Clean-up mails
- [ ] Set MIT
- [ ] clean up download and inbox
- [ ] Clean up Onenote
In my .emacs, I have
(setq org-enforce-todo-dependencies t)
(setq org-enforce-todo-checkbox-dependencies t)
I thought that if I checked all the boxes, my parent todo would automatically be set to "done". However, this is not happening. I tried it with a clean start (only the two lines above in the .emacs file), but it still doesn't work. I also tried with todos as subtasks, but this doesn't work either (setting the status of TODO to DONE of the subtasks, doesn't automatically set the status of the parent to "done".
Perhaps somebody knows how to get the behavior?
Cheers
Renger
Upvotes: 2
Views: 635
Reputation: 6422
Dependency checking prevents you from setting the parent to DONE
if any of the children are still not DONE
. It does not automatically change the state of the parent.
I had written a function to do what you want, but that was a long time ago, with a version of org-mode that is ancient by current standards. I don't know if it still works, but it might give you some idea of how to go about it. You can find it at http://orgmode.org/worg/org-hacks.html#mark-done-when-all-checkboxes-checked
N.B. The above page refers to a couple of postings to the org-mode mailing list. Those references use links to GMane, but GMane had severe problems about a year ago and it was taken out of commission for a while; part of it is back, but not the part that would allow those references to work: currently and at least for the time being, those links are dead.
PS. I found the conversation in the mail archive: check the thread starting at https://www.mail-archive.com/[email protected]/msg51952.html and read all of it: there are caveats galore that I had forgotten about.
EDIT (2020/08/04): There is an improved version of the code in this Emacs SE question.
Upvotes: 2