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(Shift Assignment): overlapping timings validation #1932

Merged

Conversation

krantheman
Copy link
Collaborator

@krantheman krantheman commented Jun 29, 2024

This fixes two overlooked cases for overlapping shift timings (for the same date):-

Case 1

Shift 1:- 22:00 - 4:00

Shift 2:- 2:00 - 8:00

Shift 2 would be marked as overlapping even though it isn't. (Shift 1 starts 14 hours after Shift 2 ends)

Case 2

Shift 1:- 8:00 - 12:00

Shift 2:- 14:00 - 18:00

Shift 3:- 16:00 - 20:00

Shift 3 would not be marked as overlapping even though it is, with Shift 2.

- fix shift overlapping timings tests
- refactor tests to use helper functions and improve readability
- remove redundant test test_multiple_shift_assignments_for_same_day
@krantheman krantheman marked this pull request as ready for review July 1, 2024 10:10
@ruchamahabal ruchamahabal merged commit 9fcb2e9 into frappe:develop Jul 17, 2024
8 checks passed
ruchamahabal added a commit that referenced this pull request Jul 17, 2024
…1932

fix(Shift Assignment): overlapping timings validation (backport #1932)
ruchamahabal added a commit that referenced this pull request Jul 17, 2024
…1932

fix(Shift Assignment): overlapping timings validation (backport #1932)
@krantheman krantheman deleted the fix-shift-overlapping-condition branch July 18, 2024 07:38
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.

None yet

2 participants