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.11k stars 543 forks source link

Optimize Timetracker for restart with another task #4499

Open xstable opened 8 months ago

xstable commented 8 months ago

Describe the issue

If you stop a running time-track and then start another one (during 1 minute), you got the message, that it can not be started, as there is an overlap with an earlier time-entry.

I think the reason is ... if you stop at 10:11 (and 123 milliseconds), and start the next at 10:11 (and 800 milliseconds) the issue appear, as the timetracker start within the same minute.

I very often have this issue, as I work on task 1, stop it, and click on another Task I want to continue (means I choose "start new" via the three-dot menu of an existing task)

Would be nice if the timetracker would be so smart to check, if the previous "finished" timelog was in the current minute, that he start the next timetrack up from the next minute... ... or change the previous minute to "time -1minute" and start the current from the current minute.

I already tried

Kimai version

2.6.0

How do you run Kimai?

Virtual Server or alike

Which PHP version are you using?

8.1

Logfile

No response

Screenshots

No response

kevinpapst commented 8 months ago

That is usually a rounding rules issue. If you round up one minute at the end and round down 1 minute at the begin, your will have an overlap.

E.g. Stop at 11:30:17 (makes it 11:31:00), Restart at 11:30:39 (makes it 11:30:00).

Try to change your rounding rules at System > Configuration.

xstable commented 8 months ago

Ok, good to know. I still have the default-settings (as far as I know) image

So what would you recommend to set here? (Really appreciate a hint)

If I choose "ceil: start, ending and duration will be rounded up" would it work like that:

If I stop a task at 11:39:17 it will be rounded to 11:40:00 and if I start next task at 11:39:25 it's also rounded to 11:40:00. (Kimai don't have an issue, if both Start & END point to same minute?!?)

Or do I need - additionally turn off one of both (start or end-rounding)?

kevinpapst commented 8 months ago

Give it a try 😁 Kimai shouldn't have an issue if start = end (both are 11:40:00)