Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress bar inside query not working, seems not updating #31

Open
kumaresh0 opened this issue Nov 6, 2022 · 2 comments
Open

Progress bar inside query not working, seems not updating #31

kumaresh0 opened this issue Nov 6, 2022 · 2 comments

Comments

@kumaresh0
Copy link

kumaresh0 commented Nov 6, 2022

Progress bar inside query not working, seems not updating

Query used:

#+BEGIN_QUERY
{:title "{{renderer :todomaster}}"
:query [:find (pull ?b [* {:block/_parent ...}])
:where
[?b :block/marker ?marker]
[(contains? #{"LATER" "NOW" "TODO" "DOING"} ?marker)]

[?b :block/ref-pages ?p]
[?p :block/name ?tag]
[(contains? #{"personal"} ?tag)]]

}
#+END_QUERY

Screenshot
latest logseq release .10
image

@kumaresh0
Copy link
Author

#+BEGIN_QUERY
   { :title "{{renderer :todomaster}}"
        :query 
                [:find (pull ?b [*])
                :where
                        [?b :block/marker ?m]
                        [(contains? #{"TODO" "LATER" "DOING" "NOW"} ?m)]
                        [?b :block/ref-pages ?p]
                        [?p :block/name ?tag]
                        [(contains? #{"personal"} ?tag)]
                        ]
                :result-transform 
                        (fn [result] (sort-by (fn [h] (get-in h [:block/priority])) result))
        :breadcrumb-show? false
        :collapsed? true}
#+END_QUERY

@ajay126z
Copy link

I think purpose of TODO master progress bar is to provide percentages of todo, doing and done tasks.
You are searching tasks which have status either TODO or DOING.
Can you try to modify the the query like below and see the result.

#+BEGIN_QUERY
{ :title "{{renderer :todomaster}}"
:query
[:find (pull ?b [*])
:where
[?b :block/marker ?m]
[(contains? #{"TODO" "LATER" "DOING" "NOW" "DONE"} ?m)]
[?b :block/ref-pages ?p]
[?p :block/name ?tag]
[(contains? #{"personal"} ?tag)]
]
:result-transform
(fn [result] (sort-by (fn [h] (get-in h [:block/priority])) result))
:breadcrumb-show? false
:collapsed? true}
#+END_QUERY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants