Closed mpermperpisang closed 1 month ago
Hi, thanks for opening this issue! Yes, I think it definitely would be possible to disallow overlapping time entries. I'm not sure whether or not to make that feature a requirement. I see two options: period inserts must have no overlapping time entries (so you have to make sure the period insert is correct beforehand), or period inserts go through with any overlapping time entries being excluded. The first option makes it a requirement. Which option did you have in mind? I'm thinking it would be better to make this feature into a toggle, similar to the select days feature.
Just to clarify: by overlapping time entry, do you mean an entry with the same user and activity on the same day? I'm considering the case where someone can have multiple time entries on the same day but with different activities.
on my case when someone request sick leave / annual leave or any leave they have, they shouldnt have activity like work from office, @lnNgyn1
Okay, it seems like you have two separate activities: one for sick leave and one for work from office. I will implement the first option and have that apply to any activity so that any period insert with an overlapping time entry will show an error message. I'll start working on it as soon as I can and let you know when I've added the feature.
thank you so much :)
@mpermperpisang I've updated the plugin to disallow overlapping time entries if it is not allowed by the time tracking system settings. Submitting a period insert with an overlapping time entry will show an error message with the date of the first/earliest overlapping time entry found. Let me know if you have any problems or suggestions!
Working on this feature also gave me the opportunity to revisit and refactor the plugin. For reference, here are the other notable changes I made:
Activity
, Project
, and Customer
of the period insert. In order for the period insert to be detected as billable, the Activity
, Project
, and Customer
all need to be billable. This detection applies to all users.0:00
.24:00
: This will result in an entry with the same end time and a duration in which 24 hours are repeatedly subtracted from itself until the duration is less than 24:00
. So, 36:34
becomes 12:34
, and 95:41
becomes 23:41
.Allow time entries in the future
, Allow time entries with an empty duration
, Allow overlapping time entries
, and Allow overbooking of stored budgets
settings. If any of those settings are disabled, the period insert will check and show the appropriate error messages for them.Default
, Duration
, and Time-clock
. The Duration
mode will set the begin field to a default start-time and hide it. The Time-clock
mode will hide the period insert form because period inserts do not implement running time entries.awesome i'll re-check it and update to you once i'm doing a testing
^_^
first i inputed the annual leave
then i input the period to work from office *overlapping is disable
i checked the Calendar menu *there are 2 activities
i also tried to enable overlapping *and there are 3 activities as a result
did I do it wrong? or what do your expectation of the feature? thank you @lnNgyn1
my expectation is like here *there is an error You already have an entry for this time.
Oh, I wasn't aware that Kimai already had an allow overlapping time entries option. I'll work on using that instead.
The Allow overlapping time entries
option should not be outside of the Extended settings
menu. I ran into a similar issue in my installation. To fix it, you need to restart your Kimai installation. On Docker, I ran the command docker restart kimai-container
. You may also need to clear the cache. The error is a popup message after you submit the form, instead showing up on the form itself.
@mpermperpisang I updated the plugin to incorporate the time tracking system settings. It now checks for the Allow time entries in the future
, Allow time entries with an empty duration
, and Allow overlapping time entries
options. It also takes into account the timetracking mode, so selecting the [Duration] configurable fixed start-time, only duration can be changed
mode will hide the begin time field from the period insert page. So, the Allow overlapping time entries
option is no longer under the Extended settings
menu. Let me know if you have any problems or suggestions!
I still need to implement the Allow overbooking of stored budgets
option, but the updated plugin should resolve your issue!
it works now, @lnNgyn1 🙌🙌🙌
@mpermperpisang Yay, I'm glad it worked!
By the way, I've updated the plugin again! It now applies the Allow overbooking of stored budgets
option and the [Time-clock] user can start and stop records, but not edit the times or duration
timetracking mode. Since period inserts are not allowed in the [Time-clock]
timetracking mode, the page will hide the period insert form and show the message Period Insert is not allowed in the [Time-clock] timetracking mode.
I also fixed two minor bugs from the release you installed:
The latest release should have all the changes I mentioned. If you run into any problems, let me know!
Another bug: code did not check if Allow overbooking of stored budgets
option was enabled. Commit fac6404 fixed this issue. Latest release has been updated.
Hi First I want to say thank you so much for this awesome plugin It really helps me to manage my freelancers
The thing is when I'm trying to insert time range but at the specific date has already input some activity, it still work The expectation is, we dont want to overlap the time entries from any entry point
Will it be possible to disallow or showing some error message when at the same day has already have other activity?
Thank you :)