GothenburgBitFactory / taskwarrior

Taskwarrior - Command line Task Management
https://taskwarrior.org
MIT License
4.37k stars 297 forks source link

Display task as tree #2006

Open pinpox opened 6 years ago

pinpox commented 6 years ago

Hello,

I would propose to implement a command to display the selected tasks as a tree using their dependencies. The use case for this would be to view the dependencies of tasks easily.

The actual display of the tree could look similar to what the "tree" utility looks on linux. image

ghost commented 6 years ago

This is not enough, because you can easily build directed acyclic graph, like below, that cannot be correctly displayed with tree-like command.

pinpox commented 6 years ago

Well you could display items twice or just display the items with only one dependency. But I see your point

ghost commented 6 years ago

This is not so easy, because even in this simple example you need to display d and e items three times to capture all dependencies. More nodes means much more duplication.

Something like git log --graph might be a better way.

pbeckingham commented 6 years ago

I'm very open to representing dependencies in a more visual way, but a simple tree is not enough, as @maln0ir indicates. I'm leaving this issue open, hoping for more input.

thomasrebele commented 6 years ago

One could show a task only if all of its dependencies appeared earlier in the tree. The above example would look like this:

a
|- b
|- c
   |- d
      |- e
ChargingBulle commented 6 years ago

The data is already there. As far as I understand it TaskWarrior doesn't concern itself with building ever more elaborate display measures for the same data.

This is a good job for an external script. Looking around I found the ruby script twdeps. It generates PNG images like this: IMAGE

If that's not for you then maybe look at the pythons cript taskwarrior_depends.

apkawel commented 3 years ago

I'm very open to representing dependencies in a more visual way, but a simple tree is not enough, as @maln0ir indicates. I'm leaving this issue open, hoping for more input.

I, for one, would love to have something like twdeps built into taskwarrior. (A tree would definitely not do the job.) A picture says a thousand words. I'm fairly clueless when it comes to these things, but would mermaid charts be a possibility? (https://mermaid-js.github.io/mermaid/#/) I know that Roam Research incorporated them not too long ago …

I would change the direction of the arrows in the diagram above, though. To me, the arrows in that diagram make it look like the dependencies work in reverse.

I have tried to install twdeps but I just can't get it to work. Besides taskwarrior_depends (which hasn't had many updates for about 10 years) is anyone familiar with any other options for the time being?

rmonicovia commented 2 months ago

I've made a simple script for this. I think this should be a configuration on description column, but Im not sure how this should integrate with other possible values.