dstask icon indicating copy to clipboard operation
dstask copied to clipboard

Viewing Subtasks

Open cgardner opened this issue 4 years ago • 12 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
    

cgardner avatar Feb 19 '21 15:02 cgardner

Little question, how to add subtask for a task ?

Tronyxsystem avatar Mar 14 '21 15:03 Tronyxsystem

You do that by adding a task in the notes.

- [ ] my subtask

cgardner avatar Mar 14 '21 17:03 cgardner

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

Tronyxsystem avatar Mar 14 '21 17:03 Tronyxsystem

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.

naggie avatar Mar 14 '21 18:03 naggie

Thanks for your answer ;-)

Tronyxsystem avatar Mar 16 '21 21:03 Tronyxsystem

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?)

Dieterbe avatar Mar 17 '21 07:03 Dieterbe

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 avatar Jul 09 '21 18:07 FearTheBadger

@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

cgardner avatar Jul 09 '21 19:07 cgardner

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

FearTheBadger avatar Jul 09 '21 21:07 FearTheBadger

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

naggie avatar Jul 11 '21 09:07 naggie

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! :(

dixonge avatar Sep 19 '21 18:09 dixonge

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.

naggie avatar Oct 29 '21 20:10 naggie