I have this simple query “{{query (and (todo todo doing) [[Momolingo]])}}” which gets all my TODOs for a project. I see there’s a “sort-by” for simple queries:
But don’t see how to make this sort by priority which seem to just be tags. BTW, anyway to have drag-and-drop functionality for prioritizing todos? Some kind of property could be added to the blocks that changes when their drag position is changed I suppose.
Was able to combine simple and advanced queries this way:
#+BEGIN_QUERY
{:title "🔨 All todos with current pages tag"
:query (and (todo TODO DOING) [[Momolingo]])
:result-transform (fn [result]
(sort-by (fn [h]
(get h :block/priority "Z")) result))
}
#+END_QUERY
I’ve got this working very well on some of my basic pages (which, thank you for such a simple solution!), but I use a lot of “nested” pages to keep track of various levels of specificity around projects… and that seems to break it! Any ideas about how remedy it to function properly for something like:
#+BEGIN_QUERY
{:title "🔨 All todos with current pages tag"
:query (and (todo TODO DOING) [[Momolingo/language1]])
:result-transform (fn [result]
(sort-by (fn [h]
(get h :block/priority "Z")) result))
}
#+END_QUERY
?
I’m still fairly new to logseq, so any advice is greatly appreciated!