Querying logbook entries

It would be useful if I could query logbook entries for the tasks I’m tracking for clients. I can see the totalled time when I look at an individual task, but this information does not show up in the query results. Is there a way to query logbook entry values, or/and use them in table functions (like adding up the times to get the total time spent for a list of tasks)?

If it’s not possible now, is that something that’s planned for the future?

Are you referring to this?

When you are performing a query, Logseq already displays a column called clock-time in the query table. It shows the total minutes spent on each individual task and the sum of all (total time) on top.

I’m not seeing that. Does that show up for simple queries or only for advanced ones?

Or may I be missing a setting in config.edn to enable this?

It usually appears when you create a query. But for some reason, it disappears when you change the visibility of properties.

For both.

I don’t think so. I even created a new graph that has no manual configurations to test it. It works there too.

I wonder why I don’t see that in my queries.

Although, I have one testquery, and advanced one, that does show clock-times. Why the others don’t is beyond me.

But thanks for pointing this out - it’s something to play around with.

I think I begin to see a pattern. I just did a (task done) query (producing 524) results, and it does show the clock-time (and all the other properties I add to each task. I suspect the clock-time only shows up when I reference ‘task’ in the query. I’m going to try that out now.

It usually disappears when you change the visibility of the properties (or table columns). You can re-enable them by editing the file using an external editor.

For example, let’s say I have these tasks.

If I disable the type property from appearing in the table, then you can see in the back the clock-time has disappeared now.

Now I can open this page in an external editor and fix it by adding clock-time in query-properties.

image

1 Like

Wow. Another thing I wasn’t aware of. Thanks a million. Plenty of things to experiment with :-).

1 Like

And it’s there! In all its glory! Thanks again.

1 Like