Org-mode repeating tasks with subtasks

9

4

Is there a way to make a repeating task or project with subtasks in org-mode that resets properly? I want to do something like the following:

* TODO Weekly report
  SCHEDULED: <2013-12-29 +1w>
** TODO Ask Bob for numbers
** TODO Ask Mary for numbers
** TODO Compile report

However, when I mark the subtasks as complete, and then the main task, only the main task resets as a repeating task; I then have to manually unmark the subtasks. However, if I add the repeating schedule to the subtasks, they reset as soon as I mark them complete, so I cannot track my current status on the task nor ever mark the parent task as complete.

darkfeline

Posted 2013-12-30T00:40:58.663

Reputation: 1 103

1I use checkboxes for the sub-tasks and have one at the end that reminds me to uncheck checkboxes and complete the task. Nevertheless, I agree it's not clean. – koushik – 2014-03-04T15:06:47.320

Answers

5

I've just coded up a solution to this (based heavily on the org-checklist.el code that koushik mentioned): org-subtask-reset.el

Basic use is as follows:

  1. Download and put it somewhere in your Emacs load-path.
  2. Either:
    • (require 'org-subtask-reset) somewhere in your Emacs configuration; or
    • Customize org-modules and add org-subtask-reset as an external package
  3. Set the RESET_SUBTASKS property for any task that should have its subtasks reset.

For your example, this should work:

* TODO Weekly report
  SCHEDULED: <2013-12-29 +1w>
  :PROPERTIES:
  :RESET_SUBTASKS: t
  :END:
** TODO Ask Bob for numbers
** TODO Ask Mary for numbers
** TODO Compile report

Jez

Posted 2013-12-30T00:40:58.663

Reputation: 400

This works for me, but I find it to be very slow on .org files with many tasks. A task which is not set to reset_subtasks will still take a very long time to move to the DONE state. – ovid – 2019-10-07T13:00:34.567

Very nice, I'll give it a try once I have some time. – darkfeline – 2014-03-10T23:00:16.467