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 (backport #1703) #1755

Merged

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 7, 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.


This is an automatic backport of pull request #1703 done by [Mergify](https://mergify.com).

…stamp leading to incorrect absent marking

(cherry picked from commit cda77bb)
(cherry picked from commit ab2f109)
@mergify mergify bot requested a review from ruchamahabal as a code owner May 7, 2024 17:02
@ruchamahabal ruchamahabal merged commit 232b889 into version-14-hotfix May 7, 2024
7 of 8 checks passed
@mergify mergify bot deleted the mergify/bp/version-14-hotfix/pr-1703 branch May 7, 2024 17:26
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 14.27.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants