naggie / dstask

Git powered terminal-based todo/note manager -- markdown note page per task. Single binary!

Home Page:https://calbryant.uk/blog/dstask-a-taskwarrior-alternative/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Viewing Subtasks

cgardner opened this issue · comments

Proposal

The notes aspect is great and allows subtasks, but exposing the subtasks to the user doesn't happen until a task is
resolved.

Next Command Changes

Id Subtasks Priority Tags Project Summary
1 0/0 P0 first, second myproject Do Something Awesome
2 1/2 P1 first, third myproject Some Other Task
3 0/2 P2 first, second myproject Third Task

Command

  • dstask show-subtasks - Show all subtasks for the tasks in the current context

    > 2 - Some Other Task
    [ ] First Subtask
    [x] Second Subtask
    
    > 2 - Some Other Task
    [ ] First Subtask
    [ ] Second Subtask
    
  • dstsask show-subtasks 2 - Show subtasks for a single task

    > 2 - Some Other Task
    [ ] First Subtask
    [x] Second Subtask
    

Little question, how to add subtask for a task ?

You do that by adding a task in the notes.

- [ ] my subtask

You do that by adding a task in the notes.

- [ ] my subtask

Like that ?

summary: Test
notes: |-
  - [ ] subtask
  - [ ] subtask2
  - [ ] subtask3
tags: []
project: ""
priority: P2
delegatedto: ""
subtasks: []
dependencies: []
created: 2021-03-14T18:55:03.837556082+01:00
resolved: 0001-01-01T00:00:00Z
due: 0001-01-01T00:00:00Z

Yes, though using the dstask <id> note command is recommended as it allows you to edit the markdown (n your editor) without having to yaml encode it.

Also, the notes: |- could be notes:| as the - is unnecessary, it only omits the last newline.

Thanks for your answer ;-)

Been staring at the "Next Command Changes" table for the last couple of weeks. it finally dawned upon me that the command itself doesn't change (nor its invocation), but that the table shows a sample output with a proposed new column. (just me i guess :) )

Generally this proposal looks good to me.
one thing that doesn't feel quite right is the naming of commands. next was already very similar to show-open (the former truncates, the latter doesn't. the former allows specifying by id, the other doesn't. otherwise they are identical)
The show-subtasks could also be done as a flag like -v or -with-sub or similar for open (or next). I like that the proposed subcommand precisely describes exactly what it does. (a -v flag is vague. could easily be argued it should show other things like notes), but it feels like an orthogonal feature that can be applied to many of the other commands (we have about 6 commands to show tasks. wouldn't it be reasonable to allow all of them to show subtasks as well?)

Two things:

  1. I am not able to get sub-tasking to work. I have added - [ ] subtask to my notes section and it is not automatically added to the sub-tasks. Is there something I need to do, to trigger the migration?
  2. Suggestion: to add a flag like dstask add -p 1 "subtask to task number 1". Allowing for me to define externally who the parent to a task is.

@FearTheBadger There isn't a good way to expose the sub-tasks in the dstask interface at the moment. Sub-tasks are just a task list in markdown

Ah I see, the subtasks in the yml is stub for the future. Thanks!

Not necessarily, that slice might just contain the parsed checklist-style subtasks or be removed.

I'm testing dstask precisely because of the task lists in GitHub - I really wanted those to import, but all I got was issues. I NEED subtasks! :(

I presume you want it to create a task for every subtask? They are in the notes of each task imported, is that not sufficient?

I think importing task list items as subtasks would create sync issues, as the lines could change + they have no intrinsic ID.