What I’d like to do
I would like to create a dataview table of annotated tasks. I see some great implementations of this using atomic notes for each task (e.g., Dataview task and project examples and Inbox and Task Management Database using Atomic Notes as Tasks and Dataview). However, I like to keep single-line tasks scattered across notes more in the style of obsidian-tasks and would like to be able to display this style of annotated tasks as a dataview table with the annotations (i.e., [metadata:: value]
) as columns. I’m having trouble building the correct dataviewjs
query to accomplish this with some combination of dv.taskList
, dv.table
and dv.pages().file.tasks
. Below is an example of my desired input and output. I appreciate your suggestions!
Ideally, I would like to also recognize different statuses, such as cancelled, per GitHub - deathau/obsidian-snippets, as well as subtasks.
Example
Here are some tasks, which could be scattered across different files:
- [ ] put your right foot in [created:: 2021-08-09]
- [-] take your right foot out [created:: 2021-08-09] [due:: 2021-08-16]
- [ ] put your right foot in [created:: 2021-08-10] [priority:: high]
- [ ] shake it all about [created:: 2021-08-10]
- [X] do the hokey pokey [created:: 2021-08-11] [due:: 2021-08-16] [completion: :2021-08-15]
- [>] turn yourself around [created:: 2021-08-12] [priority:: low]
Here’s what the dataview table should look like:
Task | Status | Completion Date | Due Date | Created Date | Priority | Subtasks | Parent | File |
---|---|---|---|---|---|---|---|---|
put your right foot in | incomplete | — | — | 2021-08-09 | — | — | — | myfile |
take your right foot out | cancelled | — | 2021-08-16 | 2021-08-09 | — | — | — | myfile |
put your right foot in | incomplete | — | — | 2021-08-10 | high | shake it all about | — | myfile |
shake it all about | incomplete | — | — | 2021-08-10 | — | — | put your right foot in | myfile |
do the hokey pokey | complete | 2021-08-15 | 2021-08-16 | 2021-08-11 | — | — | – | myfile |
turn yourself around | deferred | — | — | 2021-08-12 | low | — | – | myfile |
An attempt
The closest I’ve gotten is one row per file listing all tasks:
TABLE file.tasks.text
WHERE file.tasks