Hey, just saw you’re doing an awesome job in the forum, read through this thread: https://discuss.logseq.com/t/queries-for-task-management and started to get a grasp of query syntax. Thanks for that! Also, didn’t think of the proposed solution of including the queries as template, thanks! (btw, after carefully thinking about it, I’m actually going down another route and having a general task page, I worry that rendering those queries for every journal page would impact performance, what do you think about this and which is your preferred workflow?)
I’ll keep your blog in my radar, you’re a full knowledge base by itself!
P.S. I want to use the repeaters in some of my queries (TODAY’s and NEXT), but using :block/repeated? true
falls a bit short, since I would like to actually show the repeated task only when the repetition is scheduled.
I’ve been reading the mentioned thread and took a look here, but couldn’t find how to do arithmetics on repeated date.
These are my current implementations:
{:title "📅 TODAY's (Deadlines First)"
:query [:find (pull ?b [*])
:in $ ?today
:where
(task ?b #{"NOW" "LATER" "TODO" "DOING"})
(or [?b :block/deadline ?d]
[?b :block/scheduled ?d])
[(= ?d ?today)]]
:inputs [:today]
:collapsed? false
:result-transform :sort-by-deadline}
{:title "🚀 NEXT (7D)"
:query [:find (pull ?b [*])
:in $ ?today ?end
:where
(task ?b #{"NOW" "LATER" "TODO" "DOING"})
(or [?b :block/scheduled ?d]
[?b :block/deadline ?d])
[(> ?d ?today)]
[(<= ?d ?end)]
]
:inputs [:today :+7d]
:collapsed? true
:result-transform :sort-by-deadline
}
How would you go about this? Thanks in advance!