Next: Checkboxes, Previous: Priorities, Up: TODO Items
It is often advisable to break down large tasks into smaller, manageable subtasks. You can do this by creating an outline tree below a TODO item, with detailed subtasks on the tree1. To keep the overview over the fraction of subtasks that are already completed, insert either `[/]' or `[%]' anywhere in the headline. These cookies will be updates each time the todo status of a child changes. For example:
* Organize Party [33%]
** TODO Call people [1/2]
*** TODO Peter
*** DONE Sarah
** TODO Buy food
** DONE Talk to neighbor
If you would like a TODO entry to automatically change to DONE when all chilrden are done, you can use the following setup:
(defun org-summary-todo (n-done n-not-done)
"Switch entry to DONE when all subentries are done, to TODO otherwise."
(let (org-log-done org-log-states) ; turn off logging
(org-todo (if (= n-not-done 0) "DONE" "TODO"))))
(add-hook 'org-after-todo-statistics-hook 'org-summary-todo)
Another possibility is the use of checkboxes to identify (a hierarchy of) a large number of subtasks (see Checkboxes).