https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37707
--- Comment #28 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 191357 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191357&action=edit Bug 37707: Improve lead/trail period conflict detection This implements the full "protected period" concept for bookings, where each existing booking reserves: lead period + actual dates + trail period. Previously, we only checked: - New booking lead vs existing booking actual dates - New booking trail vs existing booking actual dates Now we ALSO check: - New booking lead vs existing booking trail periods - New booking trail vs existing booking lead periods This ensures librarians cannot create bookings too close together, respecting both item preparation time (lead) and processing time (trail). Test plan: 1. Apply all patches and run: yarn build 2. Configure a bookable item with 2-day lead and 3-day trail periods 3. Create booking A: January 5-9 - This reserves Jan 3-4 (lead), Jan 5-9 (actual), Jan 10-12 (trail) 4. Attempt to create booking B: January 12-15 with 2-day lead - Lead would be Jan 10-11, which conflicts with booking A's trail 5. Verify days 10-11 are visually disabled with striped pattern 6. Verify hovering shows "conflicts with existing booking's trail period" 7. Verify you cannot select January 12 as start date 8. Verify January 13 IS selectable (no conflict) 9. Run Cypress tests to confirm: npx cypress run --spec "t/cypress/integration/Circulation/bookingsModalDatePicker_spec.ts" -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
