Hi everyone,
I struggle with a query that finds TODOs in my current page and blocks linked to it. Results are ordered by priority. For the moment that is almost everything I need. But one thing would be nice: I am looking for a way to group the query results by priorities and make the groups visually more clear. Ideal would be styled grey boxes per priotity, as there are in default queries for pages.
Here is my query so far:
#+BEGIN_QUERY
{:title [:b "TODO List current page, sorted by priority"]
:query [:find (pull ?b [*])
:in $ ?current
:where
[?b :block/marker "TODO"]
[?p :block/name ?current]
[?b :block/path-refs ?p]]
:result-transform (fn [result]
(sort-by (fn [h]
(get h :block/priority "Z")) result))
:inputs [:current-page]}
#+END_QUERY
Any help is appreciated!
Cheers Falko