I have a template that imports tasks from Confluence. Using X-Callback-URLs and a template runner, I was able to add some kind of button (ie, a link) to a TODO item which would use JavaScript to mark the task as done in Confluence. This got me thinking a bit, and I think it would be nice to be able to attach a template to a task.
  • attach the following information to a task: A template, and an identifier for the task
  • when the template is run, the task is replaced with the template's output, similar to an inline template. The template is called with a few arguments, like the tasks' identifer and the reason for why it is called
  • there is a mechanism to refresh existing tasks in a note (which runs the template for each task). This would sync the tasks' states. This would not add new tasks.
  • when the task is marked as finished or not finished, the template is run (allowing the template to propagate this information to the API)
This feature would likely not be used when adding tasks manually, but when combined with some template that imports tasks from a remote service, this could be really powerful.