[Bug 8214] Create a bound with function
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8214 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #191 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Failed QA (RM assistant QA on the Ready to push queue, 16-17 November) KEY PROBLEM: this stopped applying to main because the check-in page was rewritten. Bug 42383 replaced circ/returns.pl and circ/returns.tt with circ/checkin.pl and a Vue page, and it has been pushed to main. This bug reached Passed QA on 6 November, before that landed. The patch "Adjust holds logic to look for records that are bound to items" (old attachment 210892) changes those two files, so git bz apply stopped there on current main. I have attached a rebased series that applies to current main (156122393b0) and obsoleted all the previous attachments. It is your 21 patches in the same order, with two changes, plus two new patches: - "Adjust holds logic ...": the hunks for circ/returns.pl and circ/returns.tt are dropped, as the files no longer exist. Author, message and signoffs are unchanged. - "Add unit tests": there is a clash at the end of t/db_dependent/Koha/Item.t with bug 43948 (two new subtests appended at the same place). Both are kept, and the plan is 45. - New: "Do not send biblio_links when the Cypress tasks create items". This bug adds biblio_links to the item schema, but the Cypress sample item builder does not strip it, so every Cypress test that creates items failed with "No property biblio_links for Koha::Item". - New: "Say which record a hold on a bound-with item is for when checking in". This ports the removed returns.pl and returns.tt changes to the Vue check-in: the hold.biblio embed is allowed in the API, and the Hold found dialog shows the title of the record the hold is for, with a note "Bound-with item ..." that links to the record the item lives on. It has an API test and Cypress tests. Please review these two new patches, the second one especially. On the base before the check-in rewrite (471783c70be) the original patches worked: a hold on a linked record showed that record's title and the bound-with note at check-in. With EnableBoundWithItems off nothing bound-with shows on staff pages, OPAC or check-in. The database update is idempotent, the DBIC schema matches the database, and koha-qa.pl passes all its file checks. A regression run of the Holds, Items, Circulation and Returns tests passes. On the attached series the Cypress check-in spec passes (43 of 43), as do checkins.t, item_biblio_links.t, Koha/Item.t and the other tests the patches touch, except the two in point 2. Still to fix, most important first (not fixed by the attached patches): 1. The bound-with modal does nothing when EnableBooking is off, or the user cannot manage bookings. The island has no active Pinia store (only the booking island installs one), so removing a link throws "getActivePinia() was called but there was no active Pinia" before any request is sent. The Remove link button stays disabled and nothing is shown. Adding a link goes through the same client. Suggestion: pass mark_submitting: false in the item_biblio_links calls, or give the island the main store. 2. Jenkins will fail: t/db_dependent/Koha/Biblio.t plans 46 tests and runs 48, t/db_dependent/Reserves.t plans 74 and runs 75, and xt/tt_script_tidy.t fails on cataloguing/additem.tt (a TT tag inside a script without data-tt-allowed; the file already has its one allowed script, so the TT value needs to come from a data attribute or the existing script). 3. Removing a link that still has holds: the API correctly answers 409 holds_exist, but the Vue client throws on any non-OK response before the component can read it, so the holds warning and the force option are unreachable and the librarian sees nothing. Wrap the calls in try/catch (suppressDefaultErrorDialog) and show the error. 4. DELETE /biblios/{biblio_id}/item_biblio_links/{link_id} ignores biblio_id. Deleting link 26 through the URL of another record returned 204, where the swagger says 404. The find() with an extra biblionumber condition resolves on the primary key only. 5. Deleting the shared item skips the protection that unlinking has: safe_to_delete says yes and the delete succeeds, leaving a biblio level hold on a linked record with no items at all. Unlinking the same link is refused with 409. 6. C4::Reserves::_Findgroupreserve orders by priority only. A priority 1 hold on the home record and a priority 1 hold on a linked record tie, so which one gets the item is undefined. Please add reservedate and reserve_id as tie-breakers, and a test. 7. host_items => 1 was added to three call sites that used plain ->items (C4/Search.pm, opac-detail.pl, Koha::Biblio->pickup_locations). With EasyAnalyticalRecords on and EnableBoundWithItems off this changes holdability and pickup locations. Please drop it there or split it out. 8. The atomicupdate prints "Added ..." on every run even when INSERT IGNORE inserted nothing. From code review, not run: the OPAC can show the title of an OPAC-suppressed record that is bound to a visible one; a hold placed at the OPAC on a bound item is stored on the item's home record while staff holds keep the record being viewed; the hand-rolled modal has no focus handling, Escape or aria-modal; some modal sentences are split into untranslatable fragments. On the open questions from the QA comments: the REST list and delete actions are not gated by EnableBoundWithItems (add returns 400 when it is off), which looks deliberate for cleanup but should be stated. The test plan, section 9 (the item details page always belongs to record A) was not answered or changed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org