Keleo / DeductionTimeBundle

Configure certain activities as deduction time, resulting in negative durations for timesheets.
MIT License
6 stars 4 forks source link

Reporting shows only total amount of deducted time #8

Closed Does-This-Work closed 6 months ago

Does-This-Work commented 1 year ago

It would be great, if under Reporting the deducted time, would also be displayed under the day. Right now I can only see how much time I spend in total on breaks but I cannot see, how long my break was for a certain day.

Working Hours Total Day 1 Day 2 Day 3 Day 4 Day 5
Working 40 9 7 8 8 8
Breaks -5
Working Hours Total 35 8 6 7 7 7
kevinpapst commented 1 year ago

What screen is that?

Does-This-Work commented 1 year ago

The screen is located under /reporting/user/week /reporting/user/month /reporting/user/year grafik

kevinpapst commented 1 year ago
Bildschirmfoto 2023-05-25 um 10 37 46

Maybe you have to upgrade to the latest Kimai release?

Does-This-Work commented 1 year ago

Running Kimai: 2.0.23 Plugin Version: 2.0.1

Anything that I maybe misconfigured with the plugin? This is how I configured the break activity grafik

User View grafik

Admin View grafik

kevinpapst commented 1 year ago

Strange... I can't see any cause for that, sorry 🤷

Does-This-Work commented 1 year ago

Okay! Thanks for taking the time, to look at this issue

kevinpapst commented 1 year ago

Can you share the actual timesheet as well please. What you show doesn't really make sense. Afair there is no check that hides negative times in this screen, so I do not understand how this can happen.

Does-This-Work commented 1 year ago

Of course! I added some extra data. I also saw, that I made a mistake in the earlier screenshot. I hope the new screenshots can tell you more

grafik

grafik

Thank you for your help! 👍

EDIT: I also tried reinstalling the plugin but that didn't do anything...

stephan-senkbeil commented 6 months ago

I just came across the same issue using this plugin. I tracked this down to the twig template for the reports in which activities with a negative duration are excluded (https://github.com/kimai/kimai/blob/e98732f44a75b60a53a9a55e5a9d1b890e473526/templates/reporting/report_by_user_data.html.twig#L106).

Changing column.duration > 0 to e.g. column.duration != 0 fixes this issue but I haven't checked if anything else breaks with this change as I'm not at all familiar with the Kimai code base.

kevinpapst commented 6 months ago

Ah Interesting. So for me the rate was always bigger than 0, so it always showed up. I wonder why I added that check... Anyway, next release has the changed check for != 0 - fixed by https://github.com/kimai/kimai/pull/4609