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

Feature Request: Summed Worklogs Grouped by Description #317

Open
topnax opened this issue Dec 21, 2023 · 5 comments
Open

Feature Request: Summed Worklogs Grouped by Description #317

topnax opened this issue Dec 21, 2023 · 5 comments

Comments

@topnax
Copy link

topnax commented Dec 21, 2023

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:

image

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.

@AuHau
Copy link
Owner

AuHau commented Jan 3, 2024

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?

@topnax
Copy link
Author

topnax commented Jan 3, 2024

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.

@AuHau
Copy link
Owner

AuHau commented Jan 3, 2024

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...

@topnax
Copy link
Author

topnax commented Jan 12, 2024

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.

@AuHau
Copy link
Owner

AuHau commented Jan 17, 2024

Yeah, I thought about that as well. Sounds good to me 👍

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