[Bug 43127] New: Vue holds module: scaffolding and Express bib-level hold workflow
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43127 Bug ID: 43127 Summary: Vue holds module: scaffolding and Express bib-level hold workflow Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, lisette@bywatersolutions.com, tomascohen@gmail.com Depends on: 43126 Blocks: 43123 Target Milestone: --- Add a new Vue 3 module for hold placement, following the existing ERM / Preservation / Acquisitions pattern: - modules/holds.ts entry point, registered in rspack.config.js. - Pinia store (stores/holds.js) with session scoped holdability and pickup location caches. - Vue Router routes for the hold placement workflow. - A HoldsAPIClient wrapping the endpoints added in bug 43126. - Shared components: HoldabilityShield, HoldabilityBadge, PickupBranchPicker, HoldDateRange, HoldFeeNotice, OverrideWarning. - The Express Bib-Level Hold workflow: a single API call to GET /biblios/{id}/holdability drives a form covering pickup location, hold dates and notes, covering the common case of placing a bib level hold for a known patron and title. Add a new system preference, UseNewHoldsInterface (Yes/No, default No). When enabled, Place hold links in the staff interface point at the new Vue module instead of reserve/request.pl. reserve/request.pl and its existing behaviour are unchanged regardless of the preference value. Test plan 1. With UseNewHoldsInterface disabled (default), confirm reserve/request.pl works exactly as before. 2. Enable UseNewHoldsInterface and confirm Place hold links route to the new Vue interface. 3. Place a bib level hold through the Express workflow for a holdable title and confirm it appears correctly in the patron's account and the holds queue. 4. Confirm an ineligible patron (for example over their hold limit) is shown the correct blocker, with an override option when AllowHoldPolicyOverride is enabled. 5. Run axe-core (or equivalent) against the new components and confirm no critical or serious accessibility violations. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43123 [Bug 43123] Hold placement workflow: Vue modernisation (epic) https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43126 [Bug 43126] REST API: add holdability endpoints for biblios, items and patrons -- 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=43127 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43128 Blocks| |43129 Blocks| |43130 Status|NEW |ASSIGNED Sponsorship status|--- |Sponsored Initiative type|--- |Feature Assignee|koha-bugs@lists.koha-commun |matt.blenkinsop@openfifth.c |ity.org |o.uk Target Milestone|--- |26.11 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43128 [Bug 43128] Vue holds: granular item-level, club and multi-biblio hold workflow https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43129 [Bug 43129] Vue holds: port existing holds queue management panel https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43130 [Bug 43130] Vue-ify the Holds queue report (circ/view_holdsqueue.pl) -- 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=43127 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=43127 --- Comment #1 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 204826 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204826&action=edit Bug 43127: Add skeleton vue app Adds the basic vue components and definitions to create a Vue module for the new Holds interface Assisted-by: Sonnet 5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43127 --- Comment #2 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 204827 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204827&action=edit Bug 43127: Add UseNewHoldsInterface pref and wire in Vue module Adds a new system preference to allow toggling between the old and new holds interface Assisted-by: Sonnet 5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43127 --- Comment #3 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 204828 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204828&action=edit Bug 43127: Add the api-client for the new holds endpoints Assisted-by: Sonnet 5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43127 --- Comment #4 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 204829 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204829&action=edit Bug 43127: Identify whether an error code is overridable through the API Currently we pass back an error code for availability in the API response but the UI doesn't know if it is overridable. Rather than keeping and maintaining a separate list in the UI, we parse it into the API response so that the UI can read it directly without risking regressions if more codes are added in future Assisted-by: Sonnet 5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43127 --- Comment #5 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 204830 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204830&action=edit Bug 43127: Pass any hold fee and the priority in the holdability check Return any fee for the hold and the priority so that the UI can display these as part of the holdability check Assisted-by: Sonnet 5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43127 --- Comment #6 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 204831 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204831&action=edit Bug 43127: Update the biblio and circulation api-clients to list required endpoints Adds an client endpoint to retrieve a biblio as well as pickup locations and existing holds Assisted-by: Sonnet 5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43127 --- Comment #7 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 204832 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204832&action=edit Bug 43127: Add the vue components to handle an express hold Adds the Vue components and routes required to handle the express hold flow Assisted-by: Sonnet 5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43127 --- Comment #8 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 204833 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204833&action=edit Bug 43127: Add a test to match the API enum to the override list If the list of Override codes in Koha::Result::Availability drifts from the enum list in the API spec then errors will be thrown when overriding holds. This test verifies that they match to catch these at the development stage. Assisted-by: Sonnet 5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43127 --- Comment #9 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 204834 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204834&action=edit Bug 43127: Create a reusable HoldabilityShield component to check holdability Creates a standalone Vue component that checks and renders the holdability of a record. Could be used as a Vue island in future throughout Koha Assisted-by: Sonnet 5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43127 --- Comment #10 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 204835 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204835&action=edit Bug 43127: Allow re-trying with a new pickup location If the pickup location is blocked, the user should be abel to try again with a new pickup location rather than the form just being hidden Assisted-by: Sonnet 5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43127 --- Comment #11 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 204836 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204836&action=edit Bug 43127: Add a cypress test Assisted-by: Sonnet 5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43127 --- Comment #12 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 204837 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204837&action=edit Bug 43127: Move the override logic to a composable Assisted-by: Sonnet 5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43127 --- Comment #13 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 204838 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204838&action=edit Bug 43127: Read findborrower to pre-load the required patron Pages redirecting to request.pl/.tt use the findborrower param rather than borrowernumber so the patron was never being pre-loaded. This patch adjusts the logic to allow this to pass into the Vue app from the controller Assisted-by: Sonnet 5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43127 --- Comment #14 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 204839 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204839&action=edit Bug 43127: Check the patron's home library is allowed when setting as default Assisted-by: Sonnet 5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43127 --- Comment #15 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 204840 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204840&action=edit Bug 43127: The Place hold button should be disabled rather than hidden Assisted-by: Sonnet 5 (Anthropic) Test plan: 1) Go to Administration > System preferences, search for UseNewHoldsInterface, set it to "Use", and save. 2) Go to Administration > System preferences, search for AllowHoldPolicyOverride, and set it to "Allow". 3) Search the catalogue, open a record that has at least two items/copies on it, and click "Place hold" - A page opens titled "Place a hold on <record title>", with a box to search for a patron underneath it. 4) Type a patron's name or card number into the search box and click them in the list of suggestions - A chip/tag with the patron's name appears. Underneath it, a form appears with a pickup library dropdown, an expiry date field, a notes field, and a "Place hold" button. A summary line also appears, e.g. "2 item(s), 2 holdable · Queue position: #1". 5) Choose a pickup library, pick an expiry date, add a note, and click "Place hold" - A "Queue position: #1" confirmation appears in the bottom right corner of the page, then the page moves to the patron's own record, clicking on holds history shows the new hold at the top of their holds list. 6) Go to Administration > Circulation and fine rules. Find the row for the item type of your test record (or the "All" row) and set "Hold fee" to a non-zero amount, e.g. 3. Save. 7) Open the test patron's own record, click "Search to hold" in the toolbar at the top, then search the catalogue for your test record and click the "Place hold for [patron name]" link/dropdown item next to it in the results - The "Place a hold" page opens with the patron chip already showing that patron - the same as if you'd searched for them by hand, but without needing to. - A blue notice appears above the form: "A fee of 3.00 applies to this hold." Set the hold fee back to blank/0 afterwards. 8) In the same rules row, set "Holds allowed (total)" to 0. Save. Open "Place a hold" again for the same record and patron - The "Place hold" button is visible but greyed out and can't be clicked. A red notice reads "This hold cannot be placed:" followed by "No item on this record can fill a hold" - hovering over the greyed-out button shows the same reason in a tooltip. Set "Holds allowed (total)" back to its original value afterwards. 9) Open the test patron's record, click Edit, and under "Patron account flags" set "Lost card" to Yes. Save. Open "Place a hold" again for that patron and a record without the rule from step 7 - A red notice reads "This hold cannot be placed:" / "The patron's card has been reported lost". Unlike step 7, the "Override and place hold" button is visible below the form, and the expiry date and notes fields are still fillable - pick an expiry date and add a note now, before continuing to the next step. 10) Click "Place hold" - A popup titled "Override required" appears, listing the reason, with "Override" and "Cancel" buttons. 11) Click Cancel - The popup closes and no hold is placed. The "Place hold" button is still there so you can try again. 12) Click "Place hold" again to reopen the popup, then click "Override" inside the popup - Same as step 5 - a "Queue position" confirmation appears and the page moves to the patron's holds, showing the new hold with the expiry date and note you entered in step 8. 13) Go to Administration > System preferences, set AllowHoldPolicyOverride to "Don't allow". Edit the test patron again and set "Lost card" back to Yes if you'd already reverted it. Open "Place a hold" for that patron and record again - The same red notice appears, and the "Place hold" button is greyed out again - the same as step 7. Set AllowHoldPolicyOverride back to "Allow" and the patron's Lost card back to No afterwards. 14) Go to Administration > System preferences and set UseBranchTransferLimits to Enforce and BranchTransferLimitsType to "Item type". Go to Administration > Library transfer limits, and for your test record's home library, block a second library from receiving its item type. Open "Place a hold" for the record/patron, then open the pickup library dropdown without selecting anything yet - The blocked library appears in the list with a warning icon next to its name. Hovering over the icon shows "This pickup location is not allowed according to circulation rules". 15) Select that blocked library from the dropdown - Without reloading the page, the "Place hold" button greys out and a red notice appears, the same way as step 7. The pickup library dropdown stays visible and usable. 16) Change the pickup library dropdown back to the original library - Without reloading the page, the red notice disappears and the "Place hold" button becomes clickable again. Undo the transfer limit and revert UseBranchTransferLimits afterwards. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org