kimai / kimai

Kimai is a web-based multi-user time-tracking application. Works great for everyone: freelancers, companies, organizations - everyone can track their times, generate reports, create invoices and do so much more. SaaS version available at https://www.kimai.cloud
https://www.kimai.org
GNU Affero General Public License v3.0
3.32k stars 589 forks source link

Weekly hours bug fills in many zero hour entries when week is partly locked down #5033

Open SaturnusDJ opened 2 months ago

SaturnusDJ commented 2 months ago

Describe the issue

Did something happen to https://github.com/kimai/kimai/issues/4264?

Anyways, this is happening now:

User opens a week that is partly locked by the 'Lockdown period'. User fills in hours on a day that is not locked. Users saves. The result is many zero hour records, in the locked time frame.

Confirmed in Kimai demo. https://demo.kimai.org

Steps to reproduce in Kimai demo.

First set lockdown period settings as admin, for example: Lockdown period start (PHP relative date to now): first day of last month 00:00:00 Lockdown period end (PHP relative date to now): last day of last month 23:59:59 Lockdown grace period end (PHP relative date to lockdown period end): +9 days Save

Open weekly hours as a user (I chose tony_teamlead after already messing with john_user before) Weekly view before the bug: image Calendar before the bug: image

Now in the weekly view set the "Vero sint" project for Thursday on 4 hours and save.

Calendar after the bug: image

My times after the bug: image

I already tried

Kimai version

2.20.1

How do you run Kimai?

Docker

Which PHP version are you using?

8.1

Logfile

No response

Screenshots

No response

kevinpapst commented 2 months ago

Wow, that's nasty. And I have literally zero idea how that can happen. Thanks for the report!