[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.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org