How to get all tasks & subtasks below a tag? #1458
Answered
by
mnvwvnm
davingreen
asked this question in
Q&A
-
I annotate tasks such as: #task/today
- [] task 1
- [] subtask 1
- [] task 2
How do I query to display all tasks with #task/today tags above the list from any file? Alternatively, would like a way to write a single tag for a list of tasks rather than adding a tag to each task in the list. I tried this format and script, but it does not get any sub-tasks: - [] #task/merge
- [] task 1
- [] subtask 1
- [] task 2
Thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
mnvwvnm
Sep 28, 2022
Replies: 1 comment
-
Tasks in specific sectionFor your first example, you can't filter tasks by a tag above the tasks list. But you can use a header. For example ### tasks today
- [ ] task 1
- [ ] subtask 1
- [ ] task 2 DQL query: TASK
WHERE meta(section).subpath = "tasks today" DVJS query: dv.taskList(dv.pages().file.tasks.where(t => t.section.subpath == "tasks today")) Tasks nested in a main task with a specific tagFor - [ ] #task/merge
- [ ] task 1
- [ ] subtask 1
- [ ] task 2 DVJS query: dv.taskList(dv.pages('#task/merge').file.tasks.where(t => t.tags.includes("#task/merge")).children) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
AB1908
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tasks in specific section
For your first example, you can't filter tasks by a tag above the tasks list. But you can use a header. For example
DQL query:
DVJS query:
Tasks nested in a main task with a specific tag
For
DVJS query: