Modified "scheduled and deadline" query for Logseq DB

Hello,

I have been trying out the logseq version available through test.logseq.com (I cannot install software on my work computer). I like the “scheduled and deadline” default query, with a big caveat: I typically don’t set the time (only the date)… which means that the default query does not show the tasks scheduled or due today… even though that’s actually the most important piece of information.

I have found custom queries, but they all use a syntax (starting with #+BEGIN_QUERY) that seems deprecated in the version I am using. How can I achieve the desired result with the new (advanced query) syntax?

Sorry this isn’t an answer but I’ve just been testing and this is a bit of a blind spot for me too.

I will do a bit of digging and get back to you if I find the answer.

1 Like

These are the queries I could find in the code, when I looked a few months ago.

:default-queries
 {:journals
  [{:title "DOING Things"
    :query [:find (pull ?b [*])
             :in $ ?start ?today
             :where
             (task ?b #{"Doing"})
             [?b :block/page ?p]
             [?p :block/journal-day ?d]
             [(>= ?d ?start)]
             [(<= ?d ?today)]]
    :inputs [:14d :today]
    :collapsed? false}
   {:title "TODO Things"
    :query [:find (pull ?b [*])
             :in $ ?start ?next
             :where
             (task ?b #{"Todo"})
             [?b :block/page ?p]
             [?p :block/journal-day ?d]
             [(> ?d ?start)]
             [(< ?d ?next)]]
    :inputs [:today :7d-after]
    :group-by-page? false
    :collapsed? false}]}

Thanks!

Is this code to be added to config.edn? I did not find a :default-queries section in mine. I added the code at the end but it does not seem to do anything.

In the meantime, I have been trying to create an advanced query in an existing page (to iterate faster). The “DOING” query works, but the “TODO” one does not return what I was hoping it woudl (i.e. upcoming scheduled tasks).