pydo icon indicating copy to clipboard operation
pydo copied to clipboard

Create nested subtasks

Open lyz-code opened this issue 5 years ago • 4 comments

Create the relationship of subtask between tasks and the infrastructure to manage them.

I see two non excluding ways of defining editing subtasks:

  • Through commands subtask add, subtask delete or something like that.

  • Through an EDITOR parser. With pydo {{ task_id }} edit subtasks the user EDITOR is spawned with the list of subtasks as a markdown list such as:

    # task {{ task_id }}: {{ task_description }}
    * [x] Completed subtask 
    * [ ] Pending subtask 2
    

    So the user is able to add/ delete/ complete tasks in the editor, and the parser will make the required modifications.

lyz-code avatar Apr 24 '20 10:04 lyz-code

As mentioned previously, I would prefer tasks that can be nested multiple times rather than a distinction of tasks and subtasks - it is not quite clear from your description what you are planning to.

In terms of syntax, how about simply pydo <parent-id> add <subtask>? That way a subtask could be added to any task, there's no extra commands, and the syntax seems intuitive to me.

xeruf avatar Jun 12 '20 11:06 xeruf

And for any further changes, since in my idea every subtask is a task with its own id, the normal commands can be used.

xeruf avatar Jun 12 '20 11:06 xeruf

This is a rough draft of the idea, so nothing is defined yet, will do at time of implementation. But the idea is to have multiple levels of subtasks in the friendliest way possible, so yeah, probably there will only be a dependency between task objects, so we can reuse the normal commands

lyz-code avatar Jun 14 '20 11:06 lyz-code

I've started drafting this functionality in this ADR

lyz-code avatar Oct 07 '21 23:10 lyz-code