frappe / hrms

Open Source HR and Payroll Software
https://frappe.io/hr
GNU General Public License v3.0
1.29k stars 667 forks source link

fix(Shift Assignment): overlapping timings validation #1932

Closed krantheman closed 2 months ago

krantheman commented 3 months ago

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.