logseq-plugin-todo-master icon indicating copy to clipboard operation
logseq-plugin-todo-master copied to clipboard

The progress is not displayed in the queries title

Open pandasAtHome opened this issue 1 year ago • 3 comments

Version:

  • todo master: v1.10.3
  • logseq: v0.9.4

Queries:

{
  :title "{{renderer :todomaster}}"
  :query [
    :find (pull ?b [*])
    :in $ ?start ?today
    :where
      (between ?b ?start ?today)
      [?b :block/marker ?m]
  ]
  :inputs [:-30d :today]
  :result-transform (
    fn [result] (
      sort-by (
        fn [h] (
          get-in h [:block/priority]
        )
      )
      result
    )
  )
  :breadcrumb-show? false
  :collapsed? false
}

Display result:

{{renderer :todomaster}}

pandasAtHome avatar May 05 '23 09:05 pandasAtHome

Hello @pandasAtHome,

I've encountered the same problem while using Logseq Version 0.9.10. Upon investigation, I believe this issue may be linked to the Pull Request here which has been reflected in Logseq versions since 0.9.2.

Instead, when I used the following syntax, it worked correctly. Please give it a try.

{{renderer :todomaster}}
#+BEGIN_QUERY
{
    :query [:find (pull ?h [*])
            :in $ ?start ?next
            :where
            [?h :block/marker ?marker]
            [?h :block/refs ?p]
            [?p :block/journal? true]
            [?p :block/journal-day ?d]
            [(> ?d ?start)]
            [(< ?d ?next)]]
    :inputs [:today :7d-after]
    :collapsed? false}
#+END_QUERY

suzuki-shm avatar Jul 03 '23 09:07 suzuki-shm

I confirm this is working in a page block but I fail to make it work in the config.edn queries. Any idea?

    {:title "OmnivoreToAnkify {{renderer :todomaster}}"
    :query [:find (pull ?b [*])
            :where
            [?b :block/marker ?marker]
                [(contains? #{"TODO"} ?marker)]
            [?b :block/page ?page]
                [?page :block/name "omnivoreimports"]
    ]
    :collapsed? true
    :group-by-page? false
    :breadcrumb-show? false}

thiswillbeyourgithub avatar Jul 03 '23 12:07 thiswillbeyourgithub

I encountered this today, and it turns out my advanced query uses relative input :inputs [:parent-block], however, Logseq plugin API doesn't support relative input yet. https://github.com/logseq/logseq/issues/4815

weynhamz avatar Jul 30 '23 12:07 weynhamz