obsidian-dataview
obsidian-dataview copied to clipboard
Dataview shows all tasks on a page, rather than only the ones specified in the query
What happened?
I have a page with multiple task lists.
When I create a dataview for one of these lists, then the Dataview returns all tasks from that page, rather than only the ones belonging to that specific tag.
Expected behaviour would be that the query only returns the todos from that specific tag, Similar to how the Checklist Plugin works: https://github.com/delashum/obsidian-checklist-plugin
So in my example only the task "project B" should appear in the list specified in the query
DQL
task from #todo/Business
where !completed
JS
No response
Dataview Version
0.5.64
Obsidian Version
1.5.8
OS
Linux
When you specify tags outside of a task definition it's applied to the entire page, and not specific to that task. This means that when you do a task query like yours where you're asking for tags related to a particular tag it'll list either specific tags related to that tag, or all tasks from pages tagged with that tag.
In order to make the tag related to the task it self you need to do something like:
- [ ] project B #todo/Business
There are also two other methods to do this, and that would either to only have business related todos in your entire file, and keep the #todo/Business
tag, or potentially you could also limit your task query to a particular section of your note:
## Business
- [ ] project B
... Further down or in another note ...
```dataview
TASK
WHERE meta(section).subpath = "Business"
```
In either case, this is not a bug, but more of a misunderstanding on how to tag tasks.