I use for business travels this template:
- Dienstreise
template:: Dienstreise
template-including-parent:: false
-
tags:: #Dienstreise
icon:: ✈️
dienstreise-reisender::
dienstreise-start::
dienstreise-ende::
dienstreise-kosten::
- TODO Konferenzregistrierung
- TODO Hotel
- TODO Bahn
- TODO Flug
- TODO ÖPNV
- TODO Dienstreiseantrag
- TODO A1 Bescheinigung
- TODO Dienstreiseabrechnung
- TODO Erstattet
I want to write a query that shows me all business travel checklist which are “done”. And done means that all TODOs are converted in DONEs. The travels are not blocks on a travel page. For each business travel I have a single page. My approach was this, but it does not work:
#+BEGIN_QUERY
{:title "Offene Reisen"
:query [:find (pull ?p [*])
:where
[?b :block/page ?p]
[?b :block/path-refs ?ref]
[?ref :block/name "dienstreise"]
[?b :block/path-refs ?ref2]
[?ref2 :block/name "foo"]
[?b :block/marker ?marker]
(not [(contains? #{"TODO"} ?marker)])
]
}
#+END_QUERY