https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42997
--- Comment #20 from Paul Derscheid <[email protected]> --- Created attachment 202495 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202495&action=edit Bug 42997: (QA follow-up) Don't invert the booking period when syncing end dates Collecting a booking early (within the bookings lead period) with a due date override before the booking start syncs end_date to a date that precedes start_date. Koha::Booking->store has no interval validation and the clash checks' date windows never see the inverted period, so the broken row is stored silently - reproduced via AddIssue on this patchset. - pull start_date back to the checkout date whenever the synced due date precedes it, in both AddIssue and AddRenewal, so the booking window follows the loan instead of inverting - cover both paths in Circulation.t; the AddRenewal case needs the Biblio::check_booking exemption from the previous patch, as the synced window no longer overlaps the stored one Test plan: 1. prove t/db_dependent/Circulation.t 2. Set bookings_lead_period to e.g. 5 for an itemtype and enable SpecifyDueDate 3. Book an item of that itemtype for a patron starting in 3 days 4. Check it out to them today with an explicit due date of tomorrow 5. Without this patch the booking is stored with end_date before start_date; with it both dates follow the checkout period Signed-off-by: Paul Derscheid <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
