[Bug 42790] New: Bookings tab: action improvements
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790 Bug ID: 42790 Summary: Bookings tab: action improvements Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com This patchset improves the patron and biblio bookings tabs by unifying the available actions across both displays, syncing due dates with booking end dates at issue time, and introducing a booking-aware Extend action for issued bookings. Depends on: Bug 41898 (Booking status lifecycle: rename and extend) === 2.1 Unified action set across Patron and Biblio bookings displays === Both the Patron bookings tab and the Biblio bookings page show the same actions, gated on booking status and the logged-in user's permissions: Status | Edit | Cancel | Checkout | Extend new | manage_bookings | manage_bookings | circulate | â issued | â | â | â | circulate completed | â | â | â | â cancelled | â | â | â | â The Patron bookings tab currently shows only Cancel; it gains Edit and Checkout. The Biblio bookings page currently shows Edit, Cancel, and "Transform to checkout"; "Transform to checkout" is renamed Checkout and shortcuts to the checkout screen pre-populated with the patron and item. === 2.2 Due date sync at AddIssue === When a booked item is checked out, AddIssue uses booking.end_date as the default due date. If staff override the due date at checkout time, the override is synced back to booking.end_date server-side, keeping the booking and the checkout in sync from the moment of issue. === 2.3 Booking-aware extension for issued bookings === An Extend button appears in the Actions column for issued bookings. It opens a modal containing: - The current booking end_date - The current checkout date_due from the embedded issue record - A date picker that visually blocks dates where another new or issued booking exists for the same item - A Confirm button On confirm, a single API call handles all updates server-side: 1. Validates the new date against the maximum booking period 2. Checks for conflicting bookings for the same item 3. Updates date_due on the linked checkout 4. Updates end_date on the booking The Extend button is only visible to users with circulate permission. === 2.4 Checkout link and due date display for issued bookings === For rows with status = issued, the Item column additionally shows the checkout due date and a link to the checkout record. Staff can see at a glance when the loan is due back and navigate to it without leaving the bookings tab. === 2.5 Visual row indicators for uncollected past-window bookings === new bookings where start_date < today receive a table-info row class to highlight that the booking is awaiting collection. new bookings where end_date < today receive a table-warning row class to highlight that the collection window has passed. === Test plan === 1. Apply Bug 41898 patches first. 2. Create a booking for a patron on a specific item. 3. Confirm the Patron bookings tab shows Edit, Cancel, and Checkout actions for the new booking; Biblio bookings page shows the same. 4. Click Checkout â confirm it pre-populates the checkout screen with the patron and item; confirm the due date defaults to the booking end_date. 5. Override the due date at checkout; confirm booking.end_date is updated to match. 6. Confirm the issued booking shows the due date and a checkout link in the Item column on both tabs. 7. Click Extend on the issued booking; select a new date; confirm both date_due and booking.end_date are updated. 8. Create a subsequent booking for the same item and confirm its start_date is blocked in the Extend date picker. 9. Advance the clock past a new booking's start_date; confirm the row receives the table-info highlight. 10. Advance past end_date; confirm the row receives the table-warning highlight. -- 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=42790 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |41898 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 [Bug 41898] Expired bookings do not display when expired filter is used in patron record -- 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=42790 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 -- 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=42790 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Circulation| |Bookings function| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hdunne-howrie@westminster.g | |ov.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Bookings tab: action |Clarify and unify bookings |improvements |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=42790 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|41898 |42998 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41898 [Bug 41898] Expired bookings do not display when expired filter is used in patron record https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42998 [Bug 42998] Allow a requested due date when renewing a checkout via the REST API -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Scope note: this proposal has been split. - Bug 42997 now carries the booking/checkout due date synchronisation and renewal handling (AddIssue/AddRenewal end date sync, the BOOKED_DUE_DATE_CLASH checkout warning, honouring explicit due date overrides, and preventing renewals running into the next booking). - Bug 42998 now carries the REST API change allowing a requested due_date on the checkout renewal endpoints. This bug retains the UI work: the unified action set (Edit, Cancel, Checkout, Extend) across the patron and biblio bookings tables, the checkout link and due date display for issued bookings, the uncollected booking row highlights, and the Extend modal (which drives bug 42998's renewal endpoint). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 201556 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201556&action=edit Bug 42790: Add missing Scalar::Util import in Koha::REST::V1::Bookings The error handling in add() already calls blessed() but the module never imported it, so hitting the Koha::Exceptions::Booking::Clash catch branch died with an undefined subroutine error (masked as a 500 either way, but for the wrong reason). Test plan: 1) prove t/db_dependent/api/v1/bookings.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790 --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 201557 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201557&action=edit Bug 42790: Unify booking actions and display across patron and biblio tables The patron bookings tab (moremember/circulation) and the biblio bookings page previously offered different actions and rendered status, item and action cells with duplicated, subtly different code. This patch introduces a shared rendering helper (js/bookings/common.js) used by both tables, delivering: * A unified action set gated on booking status and the logged in user's permissions: - new: Edit + Cancel (manage_bookings), Checkout (circulate) - issued: no edit/cancel actions (Extend follows in a later patch) - completed/cancelled: no actions * "Transform to checkout" on the biblio bookings page is renamed "Checkout" and the same shortcut is now offered from the patron bookings tab, posting the patron, barcode and booking end date through to the checkout screen * The patron bookings tab gains the Edit action, opening the same place booking modal used elsewhere (the modal markup and assets are now included on moremember and circulation pages) * For issued bookings, the Item column now also shows the checkout due date and a link to the checkout record (via the item.checkout embed, newly allowed on the biblio bookings endpoint) * New bookings whose collection window has opened are highlighted with table-info; new bookings whose window has passed without collection are highlighted with table-warning Both pages now expose their booking permissions through Koha.addPermissions rather than bare globals. Test plan: 1) yarn api:bundle && restart_all 2) Create a booking; confirm the patron bookings tab (patron details and checkout pages) shows Edit, Cancel and Checkout actions, and that the biblio bookings page shows the same 3) Confirm Edit opens the booking modal pre-populated on all pages 4) Click Checkout and confirm the checkout screen is pre-populated with the patron and item, and the due date defaults to the booking end date 5) Check out a booked item; confirm the Item column shows the due date and a link to the checkout on both displays 6) Create bookings with past start/end dates; confirm the row highlights appear on both displays -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790 --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 201558 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201558&action=edit Bug 42790: Add booking-aware Extend action for issued bookings This patch adds an Extend action to the bookings tables for issued bookings, visible to users with the circulate permission on both the patron bookings tab and the biblio bookings page. The button opens a new modal showing the current booking end date and the current checkout due date, with a flatpickr date picker that: * blocks the date ranges of any other new or issued booking for the same item * caps the maximum selectable date at the day before the earliest subsequent booking starts On confirm, the extension is performed as a staff authorised renewal of the linked checkout - a single call to POST /api/v1/checkouts/{checkout_id}/renewal with the requested due_date and the renewal_limit override. The server validates the date against bookings for the item and keeps booking.end_date in sync with the renewed due date. Errors (clash with the next booking, renewal limits with overrides disabled) are displayed inside the modal without closing it, so staff can pick an earlier date. The Extend button only renders when the booking has a linked checkout to renew. Test plan: 1) Create a booking, check the item out to the patron (booking becomes issued) and confirm the Extend button appears on both the patron bookings tab and the biblio bookings page 2) Click Extend; confirm the modal shows the current end date and the checkout due date 3) Create a subsequent booking for the same item; re-open the modal and confirm its dates are blocked in the picker and dates beyond its start cannot be selected 4) Select a valid new date and confirm; verify both the booking end_date and the checkout due date are updated 5) Confirm the checkout now shows a renewal in its renewal history -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Sponsorship status|--- |Sponsored Comma delimited| |OpenFifth list of Sponsors| |<https://openfifth.co.uk/\> | |, Westminster City Council | |<https://www.westminster.go | |v.uk/\> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201556|0 |1 is obsolete| | Attachment #201557|0 |1 is obsolete| | Attachment #201558|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=42790 --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 202372 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202372&action=edit Bug 42790: Add missing Scalar::Util import in Koha::REST::V1::Bookings The error handling in add() already calls blessed() but the module never imported it, so hitting the Koha::Exceptions::Booking::Clash catch branch died with an undefined subroutine error (masked as a 500 either way, but for the wrong reason). Test plan: 1) prove t/db_dependent/api/v1/bookings.t 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=42790 --- Comment #6 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 202373 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202373&action=edit Bug 42790: Unify booking actions and display across patron and biblio tables The patron bookings tab (moremember/circulation) and the biblio bookings page previously offered different actions and rendered status, item and action cells with duplicated, subtly different code. This patch introduces a shared rendering helper (js/bookings/common.js) used by both tables, delivering: * A unified action set gated on booking status and the logged in user's permissions: - new: Edit + Cancel (manage_bookings), Checkout (circulate) - issued: no edit/cancel actions (Extend follows in a later patch) - completed/cancelled: no actions * "Transform to checkout" on the biblio bookings page is renamed "Checkout" and the same shortcut is now offered from the patron bookings tab, posting the patron, barcode and booking end date through to the checkout screen * The patron bookings tab gains the Edit action, opening the same place booking modal used elsewhere (the modal markup and assets are now included on moremember and circulation pages) * For issued bookings, the Item column now also shows the checkout due date and a link to the checkout record (via the item.checkout embed, newly allowed on the biblio bookings endpoint) * New bookings whose collection window has opened are highlighted with table-info; new bookings whose window has passed without collection are highlighted with table-warning Both pages now expose their booking permissions through Koha.addPermissions rather than bare globals. Test plan: 1) yarn api:bundle && restart_all 2) Create a booking; confirm the patron bookings tab (patron details and checkout pages) shows Edit, Cancel and Checkout actions, and that the biblio bookings page shows the same 3) Confirm Edit opens the booking modal pre-populated on all pages 4) Click Checkout and confirm the checkout screen is pre-populated with the patron and item, and the due date defaults to the booking end date 5) Check out a booked item; confirm the Item column shows the due date and a link to the checkout on both displays 6) Create bookings with past start/end dates; confirm the row highlights appear on both displays 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=42790 --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 202374 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202374&action=edit Bug 42790: Add booking-aware Extend action for issued bookings This patch adds an Extend action to the bookings tables for issued bookings, visible to users with the circulate permission on both the patron bookings tab and the biblio bookings page. The button opens a new modal showing the current booking end date and the current checkout due date, with a flatpickr date picker that: * blocks the date ranges of any other new or issued booking for the same item * caps the maximum selectable date at the day before the earliest subsequent booking starts On confirm, the extension is performed as a staff authorised renewal of the linked checkout - a single call to POST /api/v1/checkouts/{checkout_id}/renewal with the requested due_date and the renewal_limit override. The server validates the date against bookings for the item and keeps booking.end_date in sync with the renewed due date. Errors (clash with the next booking, renewal limits with overrides disabled) are displayed inside the modal without closing it, so staff can pick an earlier date. The Extend button only renders when the booking has a linked checkout to renew. Test plan: 1) Create a booking, check the item out to the patron (booking becomes issued) and confirm the Extend button appears on both the patron bookings tab and the biblio bookings page 2) Click Extend; confirm the modal shows the current end date and the checkout due date 3) Create a subsequent booking for the same item; re-open the modal and confirm its dates are blocked in the picker and dates beyond its start cannot be selected 4) Select a valid new date and confirm; verify both the booking end_date and the checkout due date are updated 5) Confirm the checkout now shows a renewal in its renewal history 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=42790 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |paul.derscheid@lmscloud.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202372|0 |1 is obsolete| | Attachment #202373|0 |1 is obsolete| | Attachment #202374|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=42790 --- Comment #8 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202498 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202498&action=edit Bug 42790: Add missing Scalar::Util import in Koha::REST::V1::Bookings The error handling in add() already calls blessed() but the module never imported it, so hitting the Koha::Exceptions::Booking::Clash catch branch died with an undefined subroutine error (masked as a 500 either way, but for the wrong reason). Test plan: 1) prove t/db_dependent/api/v1/bookings.t 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=42790 --- Comment #9 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202499 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202499&action=edit Bug 42790: Unify booking actions and display across patron and biblio tables The patron bookings tab (moremember/circulation) and the biblio bookings page previously offered different actions and rendered status, item and action cells with duplicated, subtly different code. This patch introduces a shared rendering helper (js/bookings/common.js) used by both tables, delivering: * A unified action set gated on booking status and the logged in user's permissions: - new: Edit + Cancel (manage_bookings), Checkout (circulate) - issued: no edit/cancel actions (Extend follows in a later patch) - completed/cancelled: no actions * "Transform to checkout" on the biblio bookings page is renamed "Checkout" and the same shortcut is now offered from the patron bookings tab, posting the patron, barcode and booking end date through to the checkout screen * The patron bookings tab gains the Edit action, opening the same place booking modal used elsewhere (the modal markup and assets are now included on moremember and circulation pages) * For issued bookings, the Item column now also shows the checkout due date and a link to the checkout record (via the item.checkout embed, newly allowed on the biblio bookings endpoint) * New bookings whose collection window has opened are highlighted with table-info; new bookings whose window has passed without collection are highlighted with table-warning Both pages now expose their booking permissions through Koha.addPermissions rather than bare globals. Test plan: 1) yarn api:bundle && restart_all 2) Create a booking; confirm the patron bookings tab (patron details and checkout pages) shows Edit, Cancel and Checkout actions, and that the biblio bookings page shows the same 3) Confirm Edit opens the booking modal pre-populated on all pages 4) Click Checkout; the checkout is submitted with the patron, item and the booking end date as due date - confirm you land on the patron's checkout screen with the checkout made (or its confirmation pending, e.g. for an early collection) 5) Check out a booked item; confirm the Item column shows the due date and a link to the checkout on both displays 6) Create bookings with past start/end dates; confirm the row highlights appear on both displays 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=42790 --- Comment #10 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202500 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202500&action=edit Bug 42790: Add booking-aware Extend action for issued bookings This patch adds an Extend action to the bookings tables for issued bookings, visible to users with the circulate permission on both the patron bookings tab and the biblio bookings page. The button opens a new modal showing the current booking end date and the current checkout due date, with a flatpickr date picker that: * blocks the date ranges of any other new or issued booking for the same item * caps the maximum selectable date at the day before the earliest subsequent booking starts On confirm, the extension is performed as a staff authorised renewal of the linked checkout - a single call to POST /api/v1/checkouts/{checkout_id}/renewal with the requested due_date and the renewal_limit override. The server validates the date against bookings for the item and keeps booking.end_date in sync with the renewed due date. Errors (clash with the next booking, renewal limits with overrides disabled) are displayed inside the modal without closing it, so staff can pick an earlier date. The Extend button only renders when the booking has a linked checkout to renew. Test plan: 1) Create a booking, check the item out to the patron (booking becomes issued) and confirm the Extend button appears on both the patron bookings tab and the biblio bookings page 2) Click Extend; confirm the modal shows the current end date and the checkout due date 3) Create a subsequent booking for the same item; re-open the modal and confirm its dates are blocked in the picker and dates beyond its start cannot be selected 4) Select a valid new date and confirm; verify both the booking end_date and the checkout due date are updated 5) Confirm the checkout now shows a renewal in its renewal history 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=42790 --- Comment #11 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202501 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202501&action=edit Bug 42790: (QA follow-up) Only treat the booking's own checkout as linked The issued-row due date display and the Extend action trusted the item.checkout embed to be the checkout that collected the booking. A stale 'issued' booking whose item has since been checked out to somebody else would display - and offer to renew - the wrong patron's loan, and that renewal would not touch the booking at all (AddRenewal only syncs bookings linked via issues.booking_id). - resolve the linked checkout by matching checkout.booking_id against the booking before rendering the due date or offering Extend Test plan: 1. Book an item, check it out to its patron; the issued row still shows the checkout due date and the Extend action works as before 2. Clear the link (UPDATE issues SET booking_id = NULL WHERE issue_id = ...) and reload; the due date and Extend action disappear instead of acting on an unlinked loan 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=42790 --- Comment #12 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202502 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202502&action=edit Bug 42790: (QA follow-up) Key status badge classes by status code The badge class lookup matched startsWith() against the translated status text. UI logic keyed on translated strings breaks as soon as one status's translation is a prefix of another's; the API status code is the stable key. - key the class map by row.status and keep the translations purely for display Test plan: 1. Load the patron and biblio bookings tables and confirm the badges keep their colours (new green, issued blue, cancelled/completed grey) 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=42790 --- Comment #13 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 202503 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202503&action=edit Bug 42790: (QA follow-up) Anchor the extend picker to the library timezone and floor it after the due date The extend picker did all of its date maths in the browser's local timezone while the API talks in instants and staff-facing displays are rendered in the library's configured timezone ($timezone()). With the two zones apart, the day boundaries drift: the floor, the blocked booking ranges and the submitted end-of-day all land on the wrong calendar day (e.g. a due date of 07/30 23:59 library time producing a floor of 08/01 in a +02:00 browser). The picker also floored at today, so with a due date a week out every selectable day but the last few shortened the loan instead of extending it - while still consuming a renewal. And the native required attribute fought the picker: submitting with an empty field popped the browser's own validation bubble over the calendar instead of the modal's styled error. - do all calendar maths in the library's timezone and hand flatpickr display dates via $toDisplayDate, mirroring the place booking modal (bug 42868) - anchor the submitted end date to the end of the selected day in the library's timezone - floor the picker at the day after the checkout due date (today for overdue checkouts) so only genuine extensions are selectable - mark the form novalidate; the submit handler's styled error message already covers the empty field Test plan: 1. Book an item, check it out and open Extend on the issued row: the first selectable date is the day after the checkout due date, also when the browser and the Koha instance are in different timezones 2. Backdate the checkout due date into the past (or let it lapse) and confirm the picker floors at today instead 3. Extend and confirm checkout due date and booking end date land on 23:59 of the selected day in the instance timezone 4. Submit with an empty date: the styled 'Please select a new end date' message appears in the modal, no browser bubble 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=42790 --- Comment #14 from Paul Derscheid <paul.derscheid@lmscloud.de> --- QA note: the new modal JS talks to the API with plain fetch, consistent with the existing booking modals (cancel_booking_modal.js and friends). Moving the bookings UI onto the APIClient/HttpClient infrastructure is deliberately not done here: bug 41129 introduces the booking-related API clients (and the HttpClient error-detail handling the extend modal would need), so unification will be a follow-up bug on top of that once bug 43108 is in. It can also pick up reflecting lead/trail periods in the extend picker's blocked ranges, which needs the circulation-rules client from the same series. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790 --- Comment #15 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Btw, the move to shared abstractions here is chef's kiss :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790 --- Comment #16 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Some great catches there Paul, thanks again for the thorough QA on this set. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42790 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41129 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41129 [Bug 41129] Migrate place_booking.js to a Vue island. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org