When I’m adding new tasks, I add them to Journal pages through the course of my interstitial logging. Then I drag a block-ref to a page called “Tasks” where I prioritize them (some get grouped into project blocks, some tasks don’t have a project).
What I’d like to add is a query at the top of the “Tasks” page which lists any tasks which haven’t had a block-reference added to this page. The query below shows all my tasks and I can manually see which ones aren’t already referenced from the “Tasks” page, but I’d like to exclude them from the query results.
Tasks.md looks like:
## Inbox
- collapsed:: true
#+BEGIN_QUERY
{
:title [:b "Unprioritized Tasks"]
:query [
:find (pull ?b [*])
:where
;; ??
[?b :block/marker ?m] ;; store task state as var ?m
(not [(contains? #{"DONE" "CANCELED" "CANCELLED"} ?m)]) ;; exclude done tasks
]
:breadcrumb-show? false
:result-transform (fn [r] (map (fn [m] (assoc m :block/collapsed? true)) r)) ;; just show the task, not the context
}
#+END_QUERY
- Ordered Tasks
- Project 1
- ((212d4fa5-8811-478d-8f07-af85141a79e0))
- ((67e36827-3f7e-4244-9b5e-1b9fe88b64cf))
- ((0ced0394-cfe9-46ba-8b6a-9b58c926576d))
- Project 2
- ((401cc7a2-9a2c-4373-b0d8-8b1a1dfd2d1a))