Feature Request: Summed Worklogs Grouped by Description
topnax opened this issue · comments
The specific enhancement requested is the ability to view the total time spent on tasks grouped by their descriptions. This feature is akin to what is available in Toggl’s web UI and browser extension:
My use case is that I'd like to use Toggl CLI to list my worklogs and log them manually to Jira. I usually create Jira worklogs at the end of the day.
If I were to use toggl ls -t
it would be tedious to sum individual worklogs in my head (especially, when there are multiple entries that aren't rounded):
$ toggl ls -t
Description Duration Start Stop
TASK-1 - Foo 0:30:00 11:00:00 AM 12/21/2023 11:30:00 AM 12/21/2023
TASK-1 - Foo 1:00:00 10:00:00 AM 12/21/2023 11:00:00 AM 12/21/2023
TASK-1 - Foo 1:00:00 09:00:00 AM 12/21/2023 10:00:00 AM 12/21/2023
TASK-2 - Bar 1:00:00 08:00:00 AM 12/21/2023 09:00:00 AM 12/21/2023
I would like to have the ability to pass --sum
argument and the CLI would produce output similar to the one displayed in the screenshot above:
When no entry is currently running:
$ toggl ls -t --sum
Description Duration Start Stop
TASK-1 - Foo 2:30:00 09:00:00 AM 12/21/2023 11:30:00 AM 12/21/2023
TASK-2 - Bar 1:00:00 08:00:00 AM 12/21/2023 09:00:00 AM 12/21/2023
When an entry is currently running:
$ toggl ls -t --sum
Description Duration Start Stop
TASK-1 - Foo 2:45:00 09:00:00 AM 12/21/2023 running
TASK-2 - Bar 1:00:00 08:00:00 AM 12/21/2023 09:00:00 AM 12/21/2023
I think can help on implementing this.
Thanks!
EDIT: I've updated examples.
I am surely open to adding new features! Unfortunately, I don't have time anymore to develop them myself, but I am happy to review & merge.
That said I don't really understand your feature from the examples you gave. Maybe I am blind, but I don't see difference between the examples you gave. Could you please elaborate?
I am surely open to adding new features! Unfortunately, I don't have time anymore to develop them myself, but I am happy to review & merge.
That said I don't really understand your feature from the examples you gave. Maybe I am blind, but I don't see difference between the examples you gave. Could you please elaborate?
@AuHau sorry, I pasted wrong snippets. I've updated the comment right now.
Thanks, I got it now.
One question, though. How do you plan to handle the "Start/Stop" information of the grouped entries? I guess you could take the "earliest start" and "latest end", but I am just wondering if we shouldn't somehow indicate that this is a grouped entry and hence it is not really a "start-stop" because there might be some gaps in the interval...
Thanks, I got it now.
One question, though. How do you plan to handle the "Start/Stop" information of the grouped entries? I guess you could take the "earliest start" and "latest end", but I am just wondering if we shouldn't somehow indicate that this is a grouped entry and hence it is not really a "start-stop" because there might be some gaps in the interval...
@AuHau I personally would like to see the same behavior as the Toggl dashboard and browser extension have. Couple "earliest start" with "latest end" and indicate that this is a grouped entry by displaying a number of entries in the group next to the entry.
Yeah, I thought about that as well. Sounds good to me 👍