[Bug 41898] New: Expired bookings do not display when expired filter is used in patron record
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Bug ID: 41898 Summary: Expired bookings do not display when expired filter is used in patron record Initiative type: --- Sponsorship --- status: Product: Koha Version: 24.11 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: hdunne-howrie@westminster.gov.uk QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com Created attachment 193520 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193520&action=edit Show expired button does not display expired bookings The 'Show expired' button in the Bookings tab of the patron record does not show expired bookings. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Circulation| |Bookings function| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk CC| |martin.renvoize@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |36789 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36789 [Bug 36789] Transform a booking into checkout -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200052 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200052&action=edit Bug 41898: Introduce 'issued' booking status; repurpose 'completed' for post-return - Add 'issued' status set on checkout (was incorrectly 'completed') - Repurpose 'completed' to mean item has been returned after booking - AddReturn now transitions 'issued' → 'completed' via booking_id on issue - filter_by_active renamed to filter_by_open (status-based, no date filter) returning status IN ('new', 'issued'); deprecated alias kept for one cycle - Clash detection and _is_final_status_transition updated for all three terminal-or-in-flight statuses: cancelled, issued, completed - list.tt: fix pre-existing bug where defaults included non-existent statuses 'pending'/'active'; corrected to ['new', 'issued'] - Templates updated: filter_by_active → filter_by_open; bookings count variable renamed closed_bookings_count to reflect status-based filtering - Status badge colours: issued=bg-info, completed=bg-secondary -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200053 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200053&action=edit Bug 41898: Add atomicupdate to introduce 'issued' booking status Alters bookings.status enum to ('new', 'cancelled', 'issued', 'completed') and migrates any existing 'completed' rows (item checked out) to 'issued'. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200054 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200054&action=edit Bug 41898: Automated Schema Update -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200055 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200055&action=edit Bug 41898: Update tests for new booking status lifecycle - Bookings.t: rewrite filter_by_active subtest as filter_by_open; verify that new/issued are open, cancelled/completed are not; past-window 'new' bookings (uncollected) remain open - Booking.t: checkout relation uses 'issued'; old_checkout uses 'completed'; clash detection extended to cover issued transition; notice test updated - Circulation.t: AddIssue sets 'issued'; AddReturn sets 'completed'; plan expanded to 6 assertions covering the full checkout→return lifecycle -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200056 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200056&action=edit Bug 41898: Fix tidiness issues flagged by QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #6 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- I submitted this too early.. error between keyboard and screen ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200052|0 |1 is obsolete| | Attachment #200053|0 |1 is obsolete| | Attachment #200054|0 |1 is obsolete| | Attachment #200055|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200070 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200070&action=edit Bug 41898: Introduce 'issued' booking status; repurpose 'completed' for post-return - Add 'issued' status set on checkout via AddIssue (was incorrectly 'completed') - Repurpose 'completed' to mean item has been returned after a booking - AddReturn now transitions 'issued' → 'completed' using booking_id on the issue - filter_by_active updated to be status-based: status IN ('new', 'issued'); previously it filtered by date range — active/inactive now reflect booking lifecycle rather than the current date relative to start/end dates - _is_final_status_transition reverted to only skip clash detection for the terminal statuses 'cancelled' and 'completed'; 'issued' is an active state and does not require bypassing clash detection - _assign_item_for_booking and _select_optimal_item already exclude items via current_checkouts; 'issued' does not need to be in the status exclusion list - list.tt: fix pre-existing bug where status filter defaults included the non-existent values 'pending'/'active'; corrected to ['new', 'issued'] - patron-detail-tabs.inc: rename expired_bookings_count → closed_bookings_count to reflect status-based (not date-based) counting - Status badge colours: issued=bg-info, completed=bg-secondary -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #8 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200071 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200071&action=edit Bug 41898: Add atomicupdate to introduce 'issued' booking status Extends bookings.status enum to ('new', 'cancelled', 'issued', 'completed'). Migrates existing data intelligently: rows with an active checkout in the issues table (via booking_id) are updated to 'issued'; rows whose item has already been returned retain 'completed', which is already correct under the new scheme where 'completed' means the booking was fully fulfilled and the item returned. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #9 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200072 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200072&action=edit Bug 41898: Automated Schema Update -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #10 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200073 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200073&action=edit Bug 41898: Update tests for new booking status lifecycle - Bookings.t: rewrite filter_by_active to verify status-based filtering; new/issued are active, cancelled/completed are not; past-window 'new' bookings (uncollected) remain active - Booking.t: checkout relation uses 'issued'; old_checkout uses 'completed'; clash detection covers issued transition; notice test updated - Circulation.t: AddIssue sets 'issued'; AddReturn sets 'completed'; plan expanded to cover the full checkout → return lifecycle -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200056|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #11 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200074 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200074&action=edit Bug 41898: Update booking status display and filtering in patron and biblio views Replace the date-based 'expired' filter with status-based filters using the AdditionalFilters framework. The patron bookings tab now uses filter-completed and filter-cancelled toggles (defaulting to showing only active new/issued bookings), matching the biblio bookings list. Status column is always visible. The 'new' status renderer no longer derives Expired/Active/Pending from dates. The timeline isActive check is updated to use the new status values. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200074|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #12 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200075 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200075&action=edit Bug 41898: Update booking status display and filtering in patron and biblio views Replace the date-based 'expired' filter with status-based filters using the AdditionalFilters framework. The patron bookings tab now uses filter-completed and filter-cancelled toggles (defaulting to showing only active new/issued bookings), matching the biblio bookings list. Status column is always visible. The 'new' status renderer no longer derives Expired/Active/Pending from dates. The timeline isActive check is updated to use the new status values. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Comma delimited| |OpenFifth list of Sponsors| |<https://openfifth.co.uk/> Sponsorship status|--- |Sponsored Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200070|0 |1 is obsolete| | Attachment #200071|0 |1 is obsolete| | Attachment #200072|0 |1 is obsolete| | Attachment #200073|0 |1 is obsolete| | Attachment #200075|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #13 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200091 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200091&action=edit Bug 41898: Add atomicupdate and update schema for 'issued' booking status Extends bookings.status enum to ('new', 'cancelled', 'issued', 'completed'). Migrates existing data intelligently: rows with an active checkout in the issues table (via booking_id) are updated to 'issued'; rows whose item has already been returned retain 'completed', which is already correct under the new scheme where 'completed' means the booking was fully fulfilled and the item returned. Sponsored-by: OpenFifth <https://openfifth.co.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #14 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200092 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200092&action=edit Bug 41898: Automated Schema Update Sponsored-by: OpenFifth <https://openfifth.co.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #15 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200093 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200093&action=edit Bug 41898: Introduce 'issued' status and update booking display/filtering Implements a 4-state booking lifecycle: new → issued (on checkout) → completed (on return), plus cancelled at any point. Backend changes: - AddIssue sets booking status to 'issued' (was incorrectly 'completed') - AddReturn transitions 'issued' → 'completed' via booking_id on the issue - filter_by_active updated to status-based: status IN ('new', 'issued'); previously it filtered by date range — active/inactive now reflect booking lifecycle rather than the current date relative to start/end dates - _is_final_status_transition reverted to only skip clash detection for terminal statuses 'cancelled' and 'completed'; 'issued' is active and does not bypass clash detection - GET /api/v1/bookings no longer pre-filters to active bookings server-side; callers must supply an explicit status filter if they need active-only Display changes: - Patron bookings tab: replaces the date-based expired/active toggle with per-status filters (completed, cancelled) using the AdditionalFilters framework; active bookings (new/issued) are shown by default - Biblio bookings list: same status-based filters; removes the date-based expired filter that was still present - Status column is always visible on both views (was previously hidden on the patron tab unless expired bookings were shown) - Status badges: new=bg-success, issued=bg-info, completed/cancelled=bg-secondary - Timeline isActive check corrected to ['new','issued'] - patron-detail-tabs.inc: rename expired_bookings_count → closed_bookings_count to reflect status-based (not date-based) counting - Filter button colour fixed to use $link-color so both views are consistent Test plan: 1. Enable the EnableBookings system preference. 2. Create a biblio with at least one bookable item. 3. Place a booking for a patron via the biblio's Bookings tab. - The booking should appear with status badge "New" (green). 4. Check out the booked item to that patron (Circulation → Check out). - Reload the Bookings tab; the booking should now show "Issued" (blue). 5. Return the item (Circulation → Check in). - Reload the Bookings tab; the booking should now show "Completed" (grey). 6. Place a second booking and cancel it from the Bookings tab Actions menu. - The booking should show "Cancelled" (grey), with the reason if provided. 7. On the biblio Bookings tab: - Completed and cancelled bookings are hidden by default. - Clicking "Include completed" shows completed bookings. - Clicking "Include cancelled" shows cancelled bookings. - Both can be toggled independently. - The Status column is always visible. 8. Navigate to the patron's detail page → Bookings tab. - Active bookings (new/issued) are shown by default. - Completed and cancelled can be toggled independently using the same filter buttons. - The Status column is always visible. 9. Confirm via the REST API that GET /api/v1/bookings (no filters) returns bookings of all statuses, not just active ones. Sponsored-by: OpenFifth <https://openfifth.co.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #16 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200094 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200094&action=edit Bug 41898: Fix callers of bookings API after removing server-side active filter The bookings REST controller previously applied filter_by_active (status IN 'new','issued') as a server-side pre-filter. Removing that pre-filter means callers that relied on it must now supply an explicit status filter. - pendingbookings.tt: add status filter to additional_filters so the pending-bookings-to-collect page still shows only new+issued bookings - place_booking.js: correct status values from the obsolete 'pending','active' (never valid in the schema) to the correct 'new','issued' Test plan: 1. Navigate to Circulation > Bookings to collect. - Confirm only bookings with status "New" or "Issued" are listed. - Complete a booking (check out then return the item) and confirm it disappears from the list. 2. On any biblio with multiple bookings, open the Place booking modal. - Create overlapping bookings where one is completed or cancelled. - Confirm the modal does not treat completed/cancelled bookings as active conflicts when checking availability. Sponsored-by: OpenFifth <https://openfifth.co.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #17 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200095 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200095&action=edit Bug 41898: Update tests for new booking status lifecycle - Bookings.t: rewrite filter_by_active to verify status-based filtering; new/issued are active, cancelled/completed are not; past-window 'new' bookings (uncollected) remain active - Booking.t: checkout relation uses 'issued'; old_checkout uses 'completed'; clash detection covers issued transition; notice test updated - Circulation.t: AddIssue sets 'issued'; AddReturn sets 'completed'; plan expanded to cover the full checkout → return lifecycle Sponsored-by: OpenFifth <https://openfifth.co.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|24.11 |Main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42790 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790 [Bug 42790] Bookings tab: action improvements -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #18 from Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> --- This is a fantastic improvement. Could it be added to the patron record 'bookings' area in Issue tab as well as bookings tab in the title record as this is where the problem is occurring for us. Staff go to the patron record and bookings tab and have no way to see completed bookings. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42997 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42997 [Bug 42997] Keep booking end dates in sync with checkout due dates at issue and renewal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|42790 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790 [Bug 42790] Clarify and unify bookings actions to 'Edit, Cancel, Checkout, Extend' shown appropriate per status and permission -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200091|0 |1 is obsolete| | Attachment #200092|0 |1 is obsolete| | Attachment #200093|0 |1 is obsolete| | Attachment #200094|0 |1 is obsolete| | Attachment #200095|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #19 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 201533 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201533&action=edit Bug 41898: Add atomicupdate and update schema for 'issued' booking status Extends bookings.status enum to ('new', 'cancelled', 'issued', 'completed'). Migrates existing data intelligently: rows with an active checkout in the issues table (via booking_id) are updated to 'issued'; rows whose item has already been returned retain 'completed', which is already correct under the new scheme where 'completed' means the booking was fully fulfilled and the item returned. Sponsored-by: OpenFifth <https://openfifth.co.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #20 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 201534 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201534&action=edit Bug 41898: Automated Schema Update Sponsored-by: OpenFifth <https://openfifth.co.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #21 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 201535 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201535&action=edit Bug 41898: Introduce 'issued' status and update booking display/filtering Implements a 4-state booking lifecycle: new → issued (on checkout) → completed (on return), plus cancelled at any point. Backend changes: - AddIssue sets booking status to 'issued' (was incorrectly 'completed') - AddReturn transitions 'issued' → 'completed' via booking_id on the issue - filter_by_active updated to status-based: status IN ('new', 'issued'); previously it filtered by date range — active/inactive now reflect booking lifecycle rather than the current date relative to start/end dates - _is_final_status_transition reverted to only skip clash detection for terminal statuses 'cancelled' and 'completed'; 'issued' is active and does not bypass clash detection - GET /api/v1/bookings no longer pre-filters to active bookings server-side; callers must supply an explicit status filter if they need active-only Display changes: - Patron bookings tab: replaces the date-based expired/active toggle with per-status filters (completed, cancelled) using the AdditionalFilters framework; active bookings (new/issued) are shown by default - Biblio bookings list: same status-based filters; removes the date-based expired filter that was still present - Status column is always visible on both views (was previously hidden on the patron tab unless expired bookings were shown) - Status badges: new=bg-success, issued=bg-info, completed/cancelled=bg-secondary - Timeline isActive check corrected to ['new','issued'] - patron-detail-tabs.inc: rename expired_bookings_count → closed_bookings_count to reflect status-based (not date-based) counting - Filter button colour fixed to use $link-color so both views are consistent Test plan: 1. Enable the EnableBookings system preference. 2. Create a biblio with at least one bookable item. 3. Place a booking for a patron via the biblio's Bookings tab. - The booking should appear with status badge "New" (green). 4. Check out the booked item to that patron (Circulation → Check out). - Reload the Bookings tab; the booking should now show "Issued" (blue). 5. Return the item (Circulation → Check in). - Reload the Bookings tab; the booking should now show "Completed" (grey). 6. Place a second booking and cancel it from the Bookings tab Actions menu. - The booking should show "Cancelled" (grey), with the reason if provided. 7. On the biblio Bookings tab: - Completed and cancelled bookings are hidden by default. - Clicking "Include completed" shows completed bookings. - Clicking "Include cancelled" shows cancelled bookings. - Both can be toggled independently. - The Status column is always visible. 8. Navigate to the patron's detail page → Bookings tab. - Active bookings (new/issued) are shown by default. - Completed and cancelled can be toggled independently using the same filter buttons. - The Status column is always visible. 9. Confirm via the REST API that GET /api/v1/bookings (no filters) returns bookings of all statuses, not just active ones. Sponsored-by: OpenFifth <https://openfifth.co.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #22 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 201536 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201536&action=edit Bug 41898: Fix callers of bookings API after removing server-side active filter The bookings REST controller previously applied filter_by_active (status IN 'new','issued') as a server-side pre-filter. Removing that pre-filter means callers that relied on it must now supply an explicit status filter. - pendingbookings.tt: add status filter to additional_filters so the pending-bookings-to-collect page still shows only new+issued bookings - place_booking.js: correct status values from the obsolete 'pending','active' (never valid in the schema) to the correct 'new','issued' Test plan: 1. Navigate to Circulation > Bookings to collect. - Confirm only bookings with status "New" or "Issued" are listed. - Complete a booking (check out then return the item) and confirm it disappears from the list. 2. On any biblio with multiple bookings, open the Place booking modal. - Create overlapping bookings where one is completed or cancelled. - Confirm the modal does not treat completed/cancelled bookings as active conflicts when checking availability. Sponsored-by: OpenFifth <https://openfifth.co.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #23 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 201537 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201537&action=edit Bug 41898: Update tests for new booking status lifecycle - Bookings.t: rewrite filter_by_active to verify status-based filtering; new/issued are active, cancelled/completed are not; past-window 'new' bookings (uncollected) remain active - Booking.t: checkout relation uses 'issued'; old_checkout uses 'completed'; clash detection covers issued transition; notice test updated - Circulation.t: AddIssue sets 'issued'; AddReturn sets 'completed'; plan expanded to cover the full checkout → return lifecycle Sponsored-by: OpenFifth <https://openfifth.co.uk/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #24 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 201538 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201538&action=edit Bug 41898: Load additional-filters.js on the circulation page The rewrite of js/tables/bookings.js in this patchset builds on AdditionalFilters, which is provided by js/additional-filters.js. The patron details page loads that asset but the circulation page did not, so the bookings tab on circ/circulation.pl died with 'AdditionalFilters is not defined' and the table never initialised. Test plan: 1) Check out to a patron with bookings and open the Bookings tab on the checkout page; confirm the table renders and no JS error is logged in the console -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited|OpenFifth |OpenFifth list of Sponsors|<https://openfifth.co.uk/> |<https://openfifth.co.uk/>, | |Westminster City Council | |<https://www.westminster.go | |v.uk/> Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201533|0 |1 is obsolete| | Attachment #201534|0 |1 is obsolete| | Attachment #201535|0 |1 is obsolete| | Attachment #201536|0 |1 is obsolete| | Attachment #201537|0 |1 is obsolete| | Attachment #201538|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #25 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 202359 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202359&action=edit Bug 41898: Add atomicupdate and update schema for 'issued' booking status Extends bookings.status enum to ('new', 'cancelled', 'issued', 'completed'). Migrates existing data intelligently: rows with an active checkout in the issues table (via booking_id) are updated to 'issued'; rows whose item has already been returned retain 'completed', which is already correct under the new scheme where 'completed' means the booking was fully fulfilled and the item returned. Sponsored-by: OpenFifth <https://openfifth.co.uk/> Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #26 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 202360 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202360&action=edit Bug 41898: Automated Schema Update Sponsored-by: OpenFifth <https://openfifth.co.uk/> Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #27 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 202361 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202361&action=edit Bug 41898: Introduce 'issued' status and update booking display/filtering Implements a 4-state booking lifecycle: new → issued (on checkout) → completed (on return), plus cancelled at any point. Backend changes: - AddIssue sets booking status to 'issued' (was incorrectly 'completed') - AddReturn transitions 'issued' → 'completed' via booking_id on the issue - filter_by_active updated to status-based: status IN ('new', 'issued'); previously it filtered by date range — active/inactive now reflect booking lifecycle rather than the current date relative to start/end dates - _is_final_status_transition reverted to only skip clash detection for terminal statuses 'cancelled' and 'completed'; 'issued' is active and does not bypass clash detection - GET /api/v1/bookings no longer pre-filters to active bookings server-side; callers must supply an explicit status filter if they need active-only Display changes: - Patron bookings tab: replaces the date-based expired/active toggle with per-status filters (completed, cancelled) using the AdditionalFilters framework; active bookings (new/issued) are shown by default - Biblio bookings list: same status-based filters; removes the date-based expired filter that was still present - Status column is always visible on both views (was previously hidden on the patron tab unless expired bookings were shown) - Status badges: new=bg-success, issued=bg-info, completed/cancelled=bg-secondary - Timeline isActive check corrected to ['new','issued'] - patron-detail-tabs.inc: rename expired_bookings_count → closed_bookings_count to reflect status-based (not date-based) counting - Filter button colour fixed to use $link-color so both views are consistent Test plan: 1. Enable the EnableBookings system preference. 2. Create a biblio with at least one bookable item. 3. Place a booking for a patron via the biblio's Bookings tab. - The booking should appear with status badge "New" (green). 4. Check out the booked item to that patron (Circulation → Check out). - Reload the Bookings tab; the booking should now show "Issued" (blue). 5. Return the item (Circulation → Check in). - Reload the Bookings tab; the booking should now show "Completed" (grey). 6. Place a second booking and cancel it from the Bookings tab Actions menu. - The booking should show "Cancelled" (grey), with the reason if provided. 7. On the biblio Bookings tab: - Completed and cancelled bookings are hidden by default. - Clicking "Include completed" shows completed bookings. - Clicking "Include cancelled" shows cancelled bookings. - Both can be toggled independently. - The Status column is always visible. 8. Navigate to the patron's detail page → Bookings tab. - Active bookings (new/issued) are shown by default. - Completed and cancelled can be toggled independently using the same filter buttons. - The Status column is always visible. 9. Confirm via the REST API that GET /api/v1/bookings (no filters) returns bookings of all statuses, not just active ones. Sponsored-by: OpenFifth <https://openfifth.co.uk/> Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #28 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 202362 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202362&action=edit Bug 41898: Fix callers of bookings API after removing server-side active filter The bookings REST controller previously applied filter_by_active (status IN 'new','issued') as a server-side pre-filter. Removing that pre-filter means callers that relied on it must now supply an explicit status filter. - pendingbookings.tt: add status filter to additional_filters so the pending-bookings-to-collect page still shows only new+issued bookings - place_booking.js: correct status values from the obsolete 'pending','active' (never valid in the schema) to the correct 'new','issued' Test plan: 1. Navigate to Circulation > Bookings to collect. - Confirm only bookings with status "New" or "Issued" are listed. - Complete a booking (check out then return the item) and confirm it disappears from the list. 2. On any biblio with multiple bookings, open the Place booking modal. - Create overlapping bookings where one is completed or cancelled. - Confirm the modal does not treat completed/cancelled bookings as active conflicts when checking availability. Sponsored-by: OpenFifth <https://openfifth.co.uk/> Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #29 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 202363 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202363&action=edit Bug 41898: Update tests for new booking status lifecycle - Bookings.t: rewrite filter_by_active to verify status-based filtering; new/issued are active, cancelled/completed are not; past-window 'new' bookings (uncollected) remain active - Booking.t: checkout relation uses 'issued'; old_checkout uses 'completed'; clash detection covers issued transition; notice test updated - Circulation.t: AddIssue sets 'issued'; AddReturn sets 'completed'; plan expanded to cover the full checkout → return lifecycle Sponsored-by: OpenFifth <https://openfifth.co.uk/> Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #30 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 202364 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202364&action=edit Bug 41898: Load additional-filters.js on the circulation page The rewrite of js/tables/bookings.js in this patchset builds on AdditionalFilters, which is provided by js/additional-filters.js. The patron details page loads that asset but the circulation page did not, so the bookings tab on circ/circulation.pl died with 'AdditionalFilters is not defined' and the table never initialised. Test plan: 1) Check out to a patron with bookings and open the Bookings tab on the checkout page; confirm the table renders and no JS error is logged in the console Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |paul.derscheid@lmscloud.de |y.org | Status|Signed Off |Passed QA Patch complexity|Small patch |Medium patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202359|0 |1 is obsolete| | Attachment #202360|0 |1 is obsolete| | Attachment #202361|0 |1 is obsolete| | Attachment #202362|0 |1 is obsolete| | Attachment #202363|0 |1 is obsolete| | Attachment #202364|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #31 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202465 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202465&action=edit Bug 41898: Add atomicupdate and update schema for 'issued' booking status Extends bookings.status enum to ('new', 'cancelled', 'issued', 'completed'). Migrates existing data intelligently: rows with an active checkout in the issues table (via booking_id) are updated to 'issued'; rows whose item has already been returned retain 'completed', which is already correct under the new scheme where 'completed' means the booking was fully fulfilled and the item returned. Sponsored-by: OpenFifth <https://openfifth.co.uk/> Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #32 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202466 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202466&action=edit Bug 41898: Automated Schema Update Sponsored-by: OpenFifth <https://openfifth.co.uk/> Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #33 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202467 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202467&action=edit Bug 41898: Introduce 'issued' status and update booking display/filtering Implements a 4-state booking lifecycle: new → issued (on checkout) → completed (on return), plus cancelled at any point. Backend changes: - AddIssue sets booking status to 'issued' (was incorrectly 'completed') - AddReturn transitions 'issued' → 'completed' via booking_id on the issue - filter_by_active updated to status-based: status IN ('new', 'issued'); previously it filtered by date range — active/inactive now reflect booking lifecycle rather than the current date relative to start/end dates - _is_final_status_transition reverted to only skip clash detection for terminal statuses 'cancelled' and 'completed'; 'issued' is active and does not bypass clash detection - GET /api/v1/bookings no longer pre-filters to active bookings server-side; callers must supply an explicit status filter if they need active-only Display changes: - Patron bookings tab: replaces the date-based expired/active toggle with per-status filters (completed, cancelled) using the AdditionalFilters framework; active bookings (new/issued) are shown by default - Biblio bookings list: same status-based filters; removes the date-based expired filter that was still present - Status column is always visible on both views (was previously hidden on the patron tab unless expired bookings were shown) - Status badges: new=bg-success, issued=bg-info, completed/cancelled=bg-secondary - Timeline isActive check corrected to ['new','issued'] - patron-detail-tabs.inc: rename expired_bookings_count → closed_bookings_count to reflect status-based (not date-based) counting - Filter button colour fixed to use $link-color so both views are consistent Test plan: 1. Enable the EnableBookings system preference. 2. Create a biblio with at least one bookable item. 3. Place a booking for a patron via the biblio's Bookings tab. - The booking should appear with status badge "New" (green). 4. Check out the booked item to that patron (Circulation → Check out). - Reload the Bookings tab; the booking should now show "Issued" (blue). 5. Return the item (Circulation → Check in). - Reload the Bookings tab; the booking should now show "Completed" (grey). 6. Place a second booking and cancel it from the Bookings tab Actions menu. - The booking should show "Cancelled" (grey), with the reason if provided. 7. On the biblio Bookings tab: - Completed and cancelled bookings are hidden by default. - Clicking "Include completed" shows completed bookings. - Clicking "Include cancelled" shows cancelled bookings. - Both can be toggled independently. - The Status column is always visible. 8. Navigate to the patron's detail page → Bookings tab. - Active bookings (new/issued) are shown by default. - Completed and cancelled can be toggled independently using the same filter buttons. - The Status column is always visible. 9. Confirm via the REST API that GET /api/v1/bookings (no filters) returns bookings of all statuses, not just active ones. Sponsored-by: OpenFifth <https://openfifth.co.uk/> Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #34 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202468 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202468&action=edit Bug 41898: Fix callers of bookings API after removing server-side active filter The bookings REST controller previously applied filter_by_active (status IN 'new','issued') as a server-side pre-filter. Removing that pre-filter means callers that relied on it must now supply an explicit status filter. - pendingbookings.tt: add status filter to additional_filters so the pending-bookings-to-collect page still shows only new+issued bookings - place_booking.js: correct status values from the obsolete 'pending','active' (never valid in the schema) to the correct 'new','issued' Test plan: 1. Navigate to Circulation > Bookings to collect. - Confirm only bookings with status "New" or "Issued" are listed. - Complete a booking (check out then return the item) and confirm it disappears from the list. 2. On any biblio with multiple bookings, open the Place booking modal. - Create overlapping bookings where one is completed or cancelled. - Confirm the modal does not treat completed/cancelled bookings as active conflicts when checking availability. Sponsored-by: OpenFifth <https://openfifth.co.uk/> Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #35 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202469 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202469&action=edit Bug 41898: Update tests for new booking status lifecycle - Bookings.t: rewrite filter_by_active to verify status-based filtering; new/issued are active, cancelled/completed are not; past-window 'new' bookings (uncollected) remain active - Booking.t: checkout relation uses 'issued'; old_checkout uses 'completed'; clash detection covers issued transition; notice test updated - Circulation.t: AddIssue sets 'issued'; AddReturn sets 'completed'; plan expanded to cover the full checkout → return lifecycle Sponsored-by: OpenFifth <https://openfifth.co.uk/> Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #36 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202470 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202470&action=edit Bug 41898: Load additional-filters.js on the circulation page The rewrite of js/tables/bookings.js in this patchset builds on AdditionalFilters, which is provided by js/additional-filters.js. The patron details page loads that asset but the circulation page did not, so the bookings tab on circ/circulation.pl died with 'AdditionalFilters is not defined' and the table never initialised. Test plan: 1) Check out to a patron with bookings and open the Bookings tab on the checkout page; confirm the table renders and no JS error is logged in the console Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #37 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202471 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202471&action=edit Bug 41898: (QA follow-up) Only list uncollected bookings on the pending list The pending bookings page lists items that have not been collected yet, but the status filter added when the server-side active pre-filter was removed included 'issued' bookings, so bookings reappeared on the list after the item had been checked out. - restrict the status filter to 'new' Test plan: 1. Place a booking starting today and open Circulation > Bookings to collect; the booking is listed 2. Check the item out to the booking patron; reload the list and confirm the booking is gone Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #38 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202472 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202472&action=edit Bug 41898: (QA follow-up) Skip clash detection when collecting a booking Transitioning a booking to 'issued' no longer skipped clash detection, and Item::check_booking treats any live checkout on the item as a clash. Switching an on-site checkout of a booked item to a regular checkout (SwitchOnSiteCheckouts) therefore crashed AddIssue with an unhandled Koha::Exceptions::Booking::Clash; collection could fail the same way whenever the biblio's bookable item pool had shrunk since the booking was placed. - short-circuit no-op stores before validation; circulation issues redundant status writes that must not re-trigger the checks - rename _is_final_status_transition to _skip_clash_detection and also skip when transitioning to 'issued' from an active status, as long as the booked period and item are unchanged - keep validating period/item changes and reactivations of terminal bookings - cover the on-site switch in Circulation.t and the store() semantics in Booking.t Test plan: 1. Enable OnSiteCheckouts and SwitchOnSiteCheckouts 2. Place a booking starting today for a patron 3. Check the booked item out to that patron from Circulation > Check out with 'On-site checkout' ticked. Do NOT use the bookings page's 'Transform to checkout' button: it submits a fixed field set that does not carry the on-site flag (Bug 36789), so the checkout would silently be a regular one and step 4 could not reproduce the switch 4. The booking shows 'Issued'. Scan the same barcode for the same patron again to switch the on-site checkout to a regular one; this crashed with Koha::Exceptions::Booking::Clash before the patch and now succeeds with the booking still 'Issued' 5. prove t/db_dependent/Koha/Booking.t t/db_dependent/Circulation.t Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #39 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202473 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202473&action=edit Bug 41898: [DO NOT PUSH] Silence expected DB exception warnings in booking tests Copy of the fix for the Bug 42391 fallout so this bug's test plan passes; the real fix is submitted on its own bug and this patch must be obsoleted, not pushed. Bug 42391 restored the DB exception warnings in Koha::Object::store, but the booking tests exercising those failure paths were left without warning_like wrappers, so Test::NoWarnings fails on both files on current main, with or without this patch set. - Koha/Booking.t: wrap the duplicate booking_id store (DuplicateID) and the invalid status enum update (BadValue) - api/v1/bookings.t: wrap the POST with an existing booking_id (409) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |43163 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43163 [Bug 43163] Booking tests fail Test::NoWarnings since Bug 42391 restored DB exception warnings -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202473|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Bug 41898 depends on bug 43163, which changed state. Bug 43163 Summary: Booking tests fail Test::NoWarnings since Bug 42391 restored DB exception warnings https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43163 What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |RESOLVED Resolution|--- |INVALID -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #40 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 --- Comment #41 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Thanks for the QA and follow-ups Paul, so happy to see this pushed now too :) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org