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: validation for circular shift times #2783

Merged
merged 4 commits into from
Feb 20, 2025

Conversation

asmitahase
Copy link
Collaborator

@asmitahase asmitahase commented Feb 12, 2025

Process Auto attendance breaks for circular overlapping shifts, hence the validation

Screen.Recording.2025-02-19.at.2.24.00.PM.mov
  • Added test

if total_minutes >= 1440:
frappe.throw(
title=_("Invalid Shift Times"),
msg=_("Please change shift times or buffers to avoid overlap."),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message is unclear. Point to the exact fields we need to change. "buffers" is unclear

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, maybe explicitly say, shift timings are overlapping with itself
Overlapping with what is ambiguous

@asmitahase asmitahase merged commit d32bf3d into frappe:develop Feb 20, 2025
7 checks passed
@asmitahase asmitahase deleted the circular-shifts branch February 20, 2025 10:51
asmitahase added a commit that referenced this pull request Feb 20, 2025
…2783

fix: validation for circular shift times (backport #2783)
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.

2 participants