Tasks with parent context

Hello,

i have a query which gives me my Tasks for today.
But sometimes when i add Tasks in the following form, i don’t really have the context of the task.

Example in a journal page:

-#meeting #clientX
  - TODO something to do
  - TODO another thing to do  

this results in something like this in my list:

  • TODO something to do
  • TODO another thing to do

but i would like the context, like this:

  • TODO #meeting #clientX something to do
  • TODO #meeting #clientX another thing to do

or alternatively if possible just include the parent block in the results, so that the context doesn’t get lost.

Any ideas how i can archive any of this?

my current query:

#+BEGIN_QUERY
   {:title [:h3 "🗓️ Todays Tasks (excl. journal)"]
    :query [:find ?d (pull ?h [*])
            :keys date block
            :in $ ?jdate
            :where
            [?h :block/marker ?m]
            [(contains? #{"LATER" "TODO" "DOING" "NOW"} ?m)]
            (or-join [?h ?d]
                     [?h :block/scheduled ?d]
                     [?h :block/deadline ?d])
            [(= ?d ?jdate)]]
    :result-transform (fn [result]
                        (for [row (sort-by :date result)]
                          (let [block-map (get row :block)
                                marker (:block/marker block-map)
                                deadline (:block/deadline block-map)
                                scheduled (:block/scheduled block-map)
                                current-properties (:block/properties block-map)
                                updated-properties (assoc current-properties :date (:date row) :marker marker :scheduled scheduled :deadline deadline)]
                            (assoc block-map
                                   :block/properties updated-properties))))
    :inputs [:today]
    :breadcrumb-show? false
    :collapsed? false}
#+END_QUERY

For table view, could add a parent column with something like this:

#+BEGIN_QUERY
   {:title [:h3 "🗓️ Todays Tasks (excl. journal)"]
    :query [:find ?parent-content ?d (pull ?h [*])
            :keys parent date block
            :in $ ?jdate
            :where
            [?h :block/marker ?m]
            [(contains? #{"LATER" "TODO" "DOING" "NOW"} ?m)]
            (or-join [?h ?d]
                     [?h :block/scheduled ?d]
                     [?h :block/deadline ?d])
            [(= ?d ?jdate)]
            [?h :block/parent ?parent]
            (or
                     [?parent :block/content ?parent-content]
                     (and
                              (not [?parent :block/content])
                              [(str "") ?parent-content]))]
    :result-transform (fn [result]
                        (for [row (sort-by :date result)]
                          (let [block-map (get row :block)
                                marker (:block/marker block-map)
                                parent (get row :parent)
                                deadline (:block/deadline block-map)
                                scheduled (:block/scheduled block-map)
                                current-properties (:block/properties block-map)
                                updated-properties (assoc current-properties :date (:date row) :marker marker :parent parent :scheduled scheduled :deadline deadline)]
                            (assoc block-map
                                   :block/properties updated-properties))))
    :inputs [:today]
    :breadcrumb-show? false
    :collapsed? false}
#+END_QUERY

@mentaloid thx, but I’m using this in the sidebar, table view does work well for that.
For now i turned on the breadcrumbs, which gives me the Parents too, but the list get a bit more messy with that. A more compact prefix with extracted tags would better.