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

fix(Auto Attendance): incorrect previous shift computation for a timestamp leading to incorrect absent marking #1703

Merged
merged 2 commits into from
May 7, 2024

Conversation

ruchamahabal
Copy link
Member

@ruchamahabal ruchamahabal commented Apr 23, 2024

2 consecutive day shifts overlapping in timings

image

Assigned to the same employee

image

Problem 1

Marks employee as absent even before last sync of check-in due to a bug in fetching previous shifts if there are missing employee checkins

image

Problem 2

Also if you create a check-in record in the grace ending period of the current shift (General Shift) - let's say 18:30:00
Actual Start would get set as 18:00:00 for this record although start is actually 07:00 so actual start should be 05:00. This only happens when the check-in timestamp falls in a period of current shift which is not valid on previous day's shift. So ideally prev_shift should have been None

image

This same fix fixes both of these cases. While getting relevant shifts, it resets the end date to not go beyond the for_timestamp.

@ruchamahabal ruchamahabal changed the title fix(Auto Attendance): incorrect absent marking fix(Auto Attendance): incorrect previous shift computation for a timestamp leading to incorrect absent marking Apr 23, 2024
@ruchamahabal ruchamahabal force-pushed the fix-absent-marking-logic branch 2 times, most recently from 3f1d5c6 to 4a05706 Compare April 23, 2024 19:22
@ruchamahabal ruchamahabal merged commit b075940 into frappe:develop May 7, 2024
7 checks passed
ruchamahabal added a commit that referenced this pull request May 7, 2024
…1703

fix(Auto Attendance): incorrect previous shift computation for a timestamp leading to incorrect absent marking (backport #1703)
ruchamahabal added a commit that referenced this pull request May 7, 2024
…1703

fix(Auto Attendance): incorrect previous shift computation for a timestamp leading to incorrect absent marking (backport #1703)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant