Here is my pages:
![image](https://discuss.logseq.com/uploads/default/original/2X/3/3449b8c853590236810dfca8451dbdb6ca30df85.png)
![image](https://discuss.logseq.com/uploads/default/original/2X/8/8625495d51813deb856f910f663658c27e32048a.png)
Both people and project are linked to one tag work
.
I would like to gather all tasks from work
tag.
So I write my journal like this:
and then simple query like this works good
{{query (and (task doing todo) [[work]] )}}
I want to avoid adding all tasks in journal under work
tag and write tasks just on first level:
and then I would like to
query all tasks which related to work
but not directly.
How can I do it?
This seems similar, but I would like to query it not only on work
page itself, but everywhere.
Thank you.
Hello! I have made an advanced query for you to accomplish just that!
#+BEGIN_QUERY
{:title "Work tasks"
:query [:find (pull ?b [*])
:where
[?t :block/name "work"] ; always lowercase
[?p :block/tags ?t]
[?b :block/refs ?p]
[?b :block/marker ?m]
[(contains? #{"TODO" "DOING"} ?m)]
]
}
#+END_QUERY
I will also link this in the task management topic ![:slight_smile: :slight_smile:](https://discuss.logseq.com/images/emoji/twitter/slight_smile.png?v=12)
1 Like
@Siferiax this is awesome ![:tada: :tada:](https://discuss.logseq.com/images/emoji/twitter/tada.png?v=12)
Exactly what I looked for ![:bowing_man: :bowing_man:](https://discuss.logseq.com/images/emoji/twitter/bowing_man.png?v=12)
Thank you!