What is the best way to model the main task / sub task relation using this plugin? #2820
-
I just found this wonderful plugin and now I am using Obsidian Tasks as my primary task management tool. Truly great work! It solves the problem of having my tasks and notes scattered across different apps, and I don't have to switch contexts when trying to find what to do or reference. I found the query feature particularly helpful, but when trying to customize it to fit my use case and workflow, I found myself stuck. Typical files of my task note looks like this: # Random Project
- [ ] #homwork random project 📅 2024-05-21
Course Site: ...
Project Description: ...
// random notes on the whole project
- [ ] subtask 1 📅 2024-05-16
// random note on subtask 1
- [ ] subtask 2
// random note on subtask 2 # Random Project 2
- [ ] #homwork random project 2 📅 2024-05-23
Course Site: ...
Project Description: ...
// random notes on the whole project
- [ ] subtask 1 📅 2024-05-13
// random note on subtask 1
- [ ] subtask 2
// random note on subtask 2
And for my query, I want to show the tasks first grouped by the filename (so all tasks in a document are displayed together), then all the files are sorted by the due date of the earliest task in it. Something like this: (Project 2 is displayed first since the earliest task in it is due on 05-13, then Project 1 since the earliest task in it is due on 05-16)
I tried some different queries but have not made any progress. As a programmer myself, I can see the similarity between the query syntax and SQL. If the analogy holds, then it would be beyond its capabilities to incorporate something like "using the earliest task in the current group as the sort field," since it requires the group to know the tasks in it. If what I want is not supported, and I am willing to change the task syntax I am currently using (like adding references / YAML or some other kind of metadata), what could I do to model this main task/subtask relationship and also show it in a query? "Task dependency" seems like a viable approach, but it seems like too much work for such a simple relationship. I searched using "subtask" as a keyword, and from previous discussions, it seems that this is not the intended usage. Or should I just consider dataview? Any ideas from long-term users? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, there's a lot to unpack there, so I may not cover everything in the first go, in what time I have available to answer this. It seems to me like you want:
The group headings are sorted alphabetically. Then inside each group, the tasks are sorted by the
I do not believe this is possible. There is a custom grouping mechanism but it does not have access to the tasks inside the group. A good workaround would be to rename your files to put the due date at the start of the file name, like:
|
Beta Was this translation helpful? Give feedback.
Hi, there's a lot to unpack there, so I may not cover everything in the first go, in what time I have available to answer this.
It seems to me like you want:
The group headings are sorted alphabetically.
Then inside each group, the tasks are sorted by the
sort by
line(s).I do not believe this is possible. There is a custom grouping mechanism but it does not have access to the tasks inside the group.
A good workaround would be to rename your files to put the due date at the start of the file name, like:
20…