Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New features: Tasks depending on each other and subtasks #96

Open
johannesh19 opened this issue Aug 18, 2024 · 2 comments
Open

New features: Tasks depending on each other and subtasks #96

johannesh19 opened this issue Aug 18, 2024 · 2 comments

Comments

@johannesh19
Copy link

johannesh19 commented Aug 18, 2024

I'm missing two important features in todo.txt:

  • The possibility to signify that one tasks depends on another task being accomplished
  • and the possibility to define sub-tasks to an existing task.

However, this requires that tasks are able to reference each other. To do so, I propose the introduction of some key-value-pairs:

  • id:[task-id] in the leading task
  • dep:[task-id] in the task dependent on another task
  • sup:[task-id] for sub-tasks below other tasks.

Since key-value-pairs are already a part of the todo.txt format rules, this feature would be fully backwards-compatible.

This is what an example could look like:

(A) Set up workshop in the @garage id:setupworkshop
(B) Sell jetski sup:setupworkshop
(B) Buy workbench sup:setupworkshop
(C) Repair lawnmower dep:setupworkshop

This describes a task (Setting up the workshop), which has two sub-tasks (Selling the jetski and buying a workbench). Another task, namely repairing the lawnmower, depends on the workshop being set up.

In a UI, sub-tasks could be shown in some sort of tree, while dependent tasks could be greyed out until the first task is done, referring to the blocking task. A rough sketch:

(A) Set up workshop in the @garage
  (B) Sell jetski
  (B) Buy workbench
? Repair lawnmower -> (A) Set up workshop in the @garage

Of course, this could lead to a few logical problems: What to do if there are "short-circuits" or tasks that are not properly nested? Also, can a "top" task be marked as done if "sub" tasks aren't?

# short-circuit
(A) Task 1 id:task1 dep:task2
(B) Task 2 id:task2 dep:task1

# improper structure
(A) Task 1 id:task1 sub:task2
(B) Task 2 id:task2 sub:task1

I'm not yet sure on how to handle these problems. My first idea would be that a sub or dependent task checks if the "top" is still present, and if isn't, ignores the dependency. So (C) Repair lawnmower dep:setupworkshop is handled like (C) Repair lawnmower if the task with the id setupworkshop isn't present in the todo.txt file (or not anymore). As for contradicting definitions, one needs to take priority over the other. This might happen by task priority or other task definitions, or by position in the file/alphabetically/random/…

However, all of this is only a rough idea, and it's quite well possible that I've overlooked some issues. I'd be happy to hear your thoughts on the matter!

@iltempo
Copy link

iltempo commented Oct 11, 2024

todo.txt is all about simplicity and portability. Simplicity is the beauty that makes task management productive. Instead of managing tasks, time should be spent getting them done.

I can understand your wish for a hierarchic structure of tasks. However, extending a tool opens up many questions that take work to answer. Either implies new rules to the format (≠ simplicity) or builds new logic (≠ portable).

My workflow combines todo.txt with the PARA Method. I keep a separate projects folder containing folders for all bigger endeavors with a definite end. Like setupworkshop in your example. In this folder, I keep all the material needed and a task list in Markdown format. My todo.txt then only contains a task mentioning to pick the next one from the Markdown file or a copy of the next one.

@johannesh19
Copy link
Author

I have never heard of the PARA method, but I'm intrigued. Totally unrelated to task management, this might help me organize my trash heapfile storage, so thank you for that!

However, I'm not entirely convinced your method is really simpler, you have just replaced subtasks with entire sub-tasklists. :)

Going a bit further with that idea, that actually could also be an approach:
(A) Set up workshop in the garage subfile:todo-garage.txt
However, that would be even more complicated in usage and implementation.

As I wrote in the beginning, key-value-pairs are already a part of the todo.txt standard, so my implementation idea is fully backwards compatible and should therefore work on all existing systems, even if they are meaningless and thus will not be interpreted into additional functionality. But on tools which have this feature implemented they deliver additional value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants