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

Weekly report with daily summary of hours per task #171

Open
ericzolf opened this issue Feb 10, 2020 · 7 comments
Open

Weekly report with daily summary of hours per task #171

ericzolf opened this issue Feb 10, 2020 · 7 comments

Comments

@ericzolf
Copy link
Contributor

As it is the format I need to use to report my time, I'd like to have a weekly summary, showing a summary of time spent on each task per day and not only at the week level.

Goodies would be:

  • be able to define the start of the day (Sunday or Monday)
  • have one line for each task, one column for each day of the week, with hours in each cell

A CSV format would also be good enough (without formatting).

@mgedmin
Copy link
Member

mgedmin commented Feb 12, 2020

be able to define the start of the day (Sunday or Monday)

Do you mean start of the week?

have one line for each task, one column for each day of the week, with hours in each cell

I used to have to track my time on a particular project in this format (and enter it into Jira). I didn't use gtimelog's reporting, but rather history browsing (alt-left/alt-right), with filtering on the project name, with entries grouped to show total time for each task in each day. I also had a bookmarklet written to convert Jira's report to show me hours + minutes instead of fractional hours.

@ericzolf
Copy link
Contributor Author

Start of the week is correct, sorry.
I already saw the workaround but it's not very convenient IMHO.

@ericzolf
Copy link
Contributor Author

Regarding again the workaround, the worst thing is that the projects/tasks get re-ordered day after day, depending on what one started to work on each day. The order should rather be always the same, either alphanumerical or the order of the tasks as entered in tasks.txt.

@mgedmin
Copy link
Member

mgedmin commented Sep 9, 2022

I used to have to track my time on a particular project in this format (and enter it into Jira). I didn't use gtimelog's reporting, but rather history browsing (alt-left/alt-right), with filtering on the project name, with entries grouped to show total time for each task in each day. I also had a bookmarklet written to convert Jira's report to show me hours + minutes instead of fractional hours.

I should mention that that was a great pain, and so I was very happy when a coworker wrote gtimelog2jira, which is what I use now.

@ericzolf
Copy link
Contributor Author

@ericzolf
Copy link
Contributor Author

I was thinking of a perhaps more versatile approach: extend the reporting "engine" to use (e.g. Jinja2) templates instead of code for generation. The current Daily/Weekly/Monthly would each become their own template file, and users could also create their own templates, e.g. one report template for each customer. I'm not married with it but I would use Jinja2 because it's rather common, I know it, and it's stable, maintained, and it should be more than powerful enough for what I have in mind.

I checked quickly for alternatives but Jinja2 seems a solid choice, e.g. https://opensource.com/resources/python/template-libraries

@mgedmin
Copy link
Member

mgedmin commented Sep 18, 2022

Hm, an interesting idea. I don't know about Jinja: while it's the most popular Python templating language, it is philosophically opposed to doing complicated logic inside the template itself, which might make it difficult to do aggregation etc. I curse Jinja's lack of list comprehensions almost every time I work with Ansible.

Also, when I stop to think how the user's supposed to provide custom templates somewhere where GTimeLog can find them, I think it's not that big of a step to providing proper Python plugin support.

(gtimelog2jira, which I mentioned earlier, ought to be a plugin. Maybe someday it will be.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants