Hi!
I have started using Logseq for all things, but there is one thing keeping me from leaving Onenote 100% and that is my personal time tracking system.
I work on many different projects, and was thinking of using properties in Logseq for this, like:
project:: ProjectName
hours:: NumberOfHoursThatDay
Then I want to have a query that sums up all the hours for each project every week.
To start off easily I thought I could sum up all hours for one project.
Getting the hours is easy enough:
:query [
:find (pull ?b [*])
:where
(property ?b :project "MyFavouriteProject")
]
But then, how to sum up these hours? I have tried a lot of different things, but without success.
I am not that familiar with Clojure, but normally I would just do a reduce
with a (+)
function to achieve something like this. But where to put it? In the result-transform
section or the view
section? These features are not very well documented, so I don’t know. All my attempts at using result-transform
have failed. I even struggle extracting the hours
part of the result.
Any help pushing me in the right direction is welcomed!
Thanks!