[Bug 42444] New: Update waitingreserves.pl to use API to fetch data
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Bug ID: 42444 Summary: Update waitingreserves.pl to use API to fetch data 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: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com The Holds Awaiting Pickup page is a pain point for larger systems with many holds. We should update how it fetches, displays, and interacts with data. -- 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=42444 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | CC| |tomascohen@gmail.com -- 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=42444 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=42444 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 198914 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198914&action=edit [DO NOT PUSH] Bug 42444: Sample waiting holds injection script Adds t/lib/sample_waiting_holds.pl which creates 35 waiting holds covering all display scenarios: - 28 current waiting holds (pagination test) - 7 expired waiting holds - 3 holds with cancellation requests - Holds with desk assigned - Items with different home/holding branch (transfer on cancel) - Items with shelving location, call number, copy number, enumchron - Patrons with varied primary_contact_method values - Patrons with email and phone numbers Usage: $ ktd --shell k$ cd /kohadevbox/koha && perl t/lib/sample_waiting_holds.pl Assisted-by: Sonnet 4.6 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 --- Comment #2 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 198915 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198915&action=edit Bug 42444: Add missing embeds for waiting holds page The waiting holds page (waitingreserves.pl) needs data that is not currently exposed through the holds API embeds. This patch adds: - desk: the desk object (name) for holds assigned to a desk - item+strings: item with string representations (library names, location descriptions, item type labels) - cancellation_requests: the actual cancellation request objects with creation_date (the existing cancellation_requested embed only returns a boolean) - patron.notice_email_address: the computed email address used for notices (respects EmailFieldPrimary syspref). Also added as a direct embed on GET /patrons and GET /patrons/{patron_id}. All underlying relationships and methods already exist in Koha::Hold, Koha::Patron, and the DBIC schema. This patch only adds them to the OpenAPI specification enum lists. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove xt/api.t t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass! 3. Verify the new embeds work: GET /api/v1/holds?status=W x-koha-embed: desk,item+strings,cancellation_requests,patron,patron.notice_email_address => SUCCESS: Response includes desk, item with _strings, cancellation_requests array, and patron with notice_email_address field 4. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 --- Comment #3 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 198916 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198916&action=edit Bug 42444: Convert waiting holds page to API-driven The waiting holds page (circ/waitingreserves.pl) loaded all waiting holds at once server-side, which is slow for libraries with many waiting holds. This patch converts it to use the REST API with DataTables for paginated, client-side rendering. Changes: - circ/waitingreserves.pl: stripped down to auth + POST actions (cancel single, cancel bulk, cancel all expired). Data loading removed entirely. - waitingreserves.tt: replaced server-rendered FOREACH loops with three kohaTable instances calling /api/v1/holds with appropriate JSON query filters: * Holds waiting: status=W, expiration_date >= today * Holds over: status=W, expiration_date < today * Cancellation requests: status=W, has cancellation_requests - Embeds used: patron, patron.notice_email_address, biblio, item+strings, desk, cancellation_requests (last tab only) - Removes waiting_holds.inc (no longer used anywhere) Test plan: 1. Apply patches (including the [DO NOT PUSH] sample data commit) 2. Populate sample data: $ ktd --shell k$ cd /kohadevbox/koha && perl t/lib/sample_waiting_holds.pl => SUCCESS: Creates 35 waiting holds covering all scenarios 3. Navigate to Circulation > Holds awaiting pickup 4. Verify 'Holds waiting' tab: => SUCCESS: Shows ~28 current holds with pagination => Columns: waiting date, hold date, expiration date, title (with barcode and item type), patron info, libraries, location, call number, copy number, enumeration => Some holds show desk name next to current library => Items with different home/holding branch show 'Cancel hold and return to: <library>' 5. Verify 'Holds waiting past their expiration date' tab: => SUCCESS: Shows 7 expired holds => 'Cancel all' button present and functional 6. Verify 'Holds with cancellation requests' tab: => SUCCESS: Shows 3 holds with cancellation request date column 7. Verify patron column: => Name links to patron detail page => Phone number displayed => Email displayed (uses patron.notice_email_address embed, respects EmailFieldPrimary syspref) => Main contact method label displayed (Primary phone, Primary email, Secondary phone, etc.) 8. Verify sorting works on all columns (server-side via API) 9. Test cancel single hold (form POST, check confirmation message) 10. Test bulk cancel (select multiple via checkboxes, confirm in modal, verify background job enqueued) 11. Test 'Cancel all' on expired holds tab 12. Verify 'View all libraries' link works (allbranches=1) 13. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=42444 Alex Carver [Acerock7] <alex@rcls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alex@rcls.org Status|Needs Signoff |Failed QA --- Comment #4 from Alex Carver [Acerock7] <alex@rcls.org> --- Hitting an issue at step 4. Navigating to the Holds Awaiting Pickup tab after applying the patch results in the following error popup: Something went wrong when loading the table. 400: Bad Request Not in enum list: +strings, cancellation_requested, biblio, deleted_biblio, pickup_library, item, patron, item_group, item_level_holds_count, iso18626_request. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 --- Comment #5 from Alex Carver [Acerock7] <alex@rcls.org> --- yarn build gets me just a touch further. I am no longer getting the error but the list never populates on Holds awaiting pickup. The processing box remains on the page indefinitely. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emmi.takkinen@koha-suomi.fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198914|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=42444 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198915|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=42444 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198916|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=42444 --- Comment #6 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 199198 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199198&action=edit [DO NOT PUSH] Bug 42444: Sample waiting holds injection script Adds t/lib/sample_waiting_holds.pl which creates 35 waiting holds covering all display scenarios: - 28 current waiting holds (pagination test) - 7 expired waiting holds - 3 holds with cancellation requests - Holds with desk assigned - Items with different home/holding branch (transfer on cancel) - Items with shelving location, call number, copy number, enumchron - Patrons with varied primary_contact_method values - Patrons with email and phone numbers Usage: $ ktd --shell k$ cd /kohadevbox/koha && perl t/lib/sample_waiting_holds.pl Assisted-by: Sonnet 4.6 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 --- Comment #7 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 199199 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199199&action=edit Bug 42444: Add missing embeds for waiting holds page The waiting holds page (waitingreserves.pl) needs data that is not currently exposed through the holds API embeds. This patch adds: - desk: the desk object (name) for holds assigned to a desk - item+strings: item with string representations (library names, location descriptions, item type labels) - cancellation_requests: the actual cancellation request objects with creation_date (the existing cancellation_requested embed only returns a boolean) - patron.notice_email_address: the computed email address used for notices (respects EmailFieldPrimary syspref). Also added as a direct embed on GET /patrons and GET /patrons/{patron_id}. All underlying relationships and methods already exist in Koha::Hold, Koha::Patron, and the DBIC schema. This patch only adds them to the OpenAPI specification enum lists. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove xt/api.t t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass! 3. Verify the new embeds work: GET /api/v1/holds?status=W x-koha-embed: desk,item+strings,cancellation_requests,patron,patron.notice_email_address => SUCCESS: Response includes desk, item with _strings, cancellation_requests array, and patron with notice_email_address field 4. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 --- Comment #8 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 199200 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199200&action=edit Bug 42444: Convert waiting holds page to API-driven The waiting holds page (circ/waitingreserves.pl) loaded all waiting holds at once server-side, which is slow for libraries with many waiting holds. This patch converts it to use the REST API with DataTables for paginated, client-side rendering. Changes: - circ/waitingreserves.pl: stripped down to auth + POST actions (cancel single, cancel bulk, cancel all expired). Data loading removed entirely. - waitingreserves.tt: replaced server-rendered FOREACH loops with three kohaTable instances calling /api/v1/holds with appropriate JSON query filters: * Holds waiting: status=W, expiration_date >= today * Holds over: status=W, expiration_date < today * Cancellation requests: status=W, has cancellation_requests - Embeds used: patron, patron.category, patron.notice_email_address, biblio, item+strings, item.holding_library, item.home_library, desk, cancellation_requests (last tab only) - Library columns sort by name via embedded relationships - Removes waiting_holds.inc (no longer used anywhere) Note: Shelving location sorting is intentionally disabled. The location value is an authorised value code resolved to a description via item+strings. Server-side sorting by AV description would require embedding the authorised_values table, which is not currently supported by the framework. Test plan: 1. Apply patches (including the [DO NOT PUSH] sample data commit) 2. Populate sample data: $ ktd --shell k$ yarn build ; koha-plack --restart kohadev k$ cd /kohadevbox/koha && perl t/lib/sample_waiting_holds.pl => SUCCESS: Creates 35 waiting holds covering all scenarios 3. Navigate to Circulation > Holds awaiting pickup 4. Verify 'Holds waiting' tab: => SUCCESS: Shows ~28 current holds with pagination => Columns: waiting date, hold date, expiration date, title (with barcode and item type), patron info, libraries, location, call number, copy number, enumeration => Some holds show desk name next to current library => Items with different home/holding branch show 'Cancel hold and return to: <library>' 5. Verify 'Holds waiting past their expiration date' tab: => SUCCESS: Shows 7 expired holds => 'Cancel all' button present and functional 6. Verify 'Holds with cancellation requests' tab: => SUCCESS: Shows 3 holds with cancellation request date column 7. Verify patron column: => Name links to patron detail page => Phone number displayed => Email displayed (uses patron.notice_email_address embed, respects EmailFieldPrimary syspref) => Main contact method label displayed (Primary phone, Primary email, Secondary phone, etc.) 8. Verify sorting works on all sortable columns (server-side via API) 9. Test cancel single hold (form POST, check confirmation message) 10. Test bulk cancel (select multiple via checkboxes, confirm in modal, verify background job enqueued) 11. Test 'Cancel all' on expired holds tab 12. Verify 'View all libraries' link works (allbranches=1) 13. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro.amorim@openfifth.co.u | |k QA Contact|testopia@bugs.koha-communit |pedro.amorim@openfifth.co.u |y.org |k -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #9 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Testing notes: - Step 12 (View all libraries) is required before step 4 for the numbers in the test plan to match what's shown. - Non-blocker: 'Cancel all' should ideally only show if there are some entries to cancel, but likely not related to this work. Some regressions (don't think any individual regression is a blocker specifically, but worth mentioning): 1) The old template had: href="mailto:[% ... | uri %]?subject=[% "Hold waiting: " | uri %][% reserveloo.biblio.title | uri %]" The new code drops the subject entirely. Staff clicking the email link used to get a pre-filled "Hold waiting: [title]" — now they get a blank compose window. 2) item_level_itypes no longer respected Old template: [% UNLESS ( item_level_itypes ) %] ...show item type... [% END %] When item-level_itypes is OFF (meaning it should display the bib level type) and an item's itype differs from the biblio's itemtype, the displayed type will be wrong (It'll always display the item_type_id from _strings. I think _strings should also return the string equivalent of effective_item_type_id. 3) The total count of holds is no longer displayed on each respective tab 4) The patrons' cardnumber used to be displayed on the 'Patron' column. It appears that is no longer the case. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42643 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42643 [Bug 42643] [OMNIBUS] Assorted performance and stability work -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 --- Comment #10 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 199392 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199392&action=edit Bug 42444: (follow-up) Fix QA regressions in waiting holds page Addresses four regressions reported during QA: 1. Restore mailto subject line 'Hold waiting: [title]' that was dropped in the conversion. Also fixes the encodeURIComponent issue (only encode the subject, not the email address). 2. Respect item-level_itypes syspref: only show item type in the title column when the syspref is OFF (matching old behavior). Uses effective_item_type_id from the API response. 3. Restore total count of holds on each tab. Uses drawCallback to update tab labels with recordsTotal from the API response. 4. Add cardnumber to patron column display, matching the old patron-title.inc output format: 'Surname, Firstname (card)'. Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #11 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- All tabs show '35' total for me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 --- Comment #12 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Pedro Amorim (ammopt) from comment #11)
All tabs show '35' total for me.
<.< -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #199392|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=42444 --- Comment #13 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 199674 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199674&action=edit Bug 42444: (follow-up) Fix QA regressions in waiting holds page Addresses four regressions reported during QA: 1. Restore mailto subject line 'Hold waiting: [title]' that was dropped in the conversion. Also fixes the encodeURIComponent issue (only encode the subject, not the email address). 2. Respect item-level_itypes syspref: only show item type in the title column when the syspref is OFF (matching old behavior). Uses effective_item_type_id from the API response. 3. Restore total count of holds on each tab. Uses drawCallback to update tab labels with recordsTotal from the API response. 4. Add cardnumber to patron column display, matching the old patron-title.inc output format: 'Surname, Firstname (card)'. Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 --- Comment #14 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Pedro Amorim (ammopt) from comment #11)
All tabs show '35' total for me.
Solved, I had picked the wrong variable i.e. recordsTotal vs. recordsDisplay -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=42444 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #199199|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=42444 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #199200|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=42444 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #199674|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=42444 --- Comment #15 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 199675 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199675&action=edit Bug 42444: Sample waiting holds injection script Adds t/lib/sample_waiting_holds.pl which creates 35 waiting holds covering all display scenarios: - 28 current waiting holds (pagination test) - 7 expired waiting holds - 3 holds with cancellation requests - Holds with desk assigned - Items with different home/holding branch (transfer on cancel) - Items with shelving location, call number, copy number, enumchron - Patrons with varied primary_contact_method values - Patrons with email and phone numbers Usage: $ ktd --shell k$ cd /kohadevbox/koha && perl t/lib/sample_waiting_holds.pl Assisted-by: Sonnet 4.6 (Anthropic) Signed-off-by: Pedro Amorim <pedro.amorim@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=42444 --- Comment #16 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 199676 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199676&action=edit Bug 42444: Add missing embeds for waiting holds page The waiting holds page (waitingreserves.pl) needs data that is not currently exposed through the holds API embeds. This patch adds: - desk: the desk object (name) for holds assigned to a desk - item+strings: item with string representations (library names, location descriptions, item type labels) - cancellation_requests: the actual cancellation request objects with creation_date (the existing cancellation_requested embed only returns a boolean) - patron.notice_email_address: the computed email address used for notices (respects EmailFieldPrimary syspref). Also added as a direct embed on GET /patrons and GET /patrons/{patron_id}. All underlying relationships and methods already exist in Koha::Hold, Koha::Patron, and the DBIC schema. This patch only adds them to the OpenAPI specification enum lists. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove xt/api.t t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass! 3. Verify the new embeds work: GET /api/v1/holds?status=W x-koha-embed: desk,item+strings,cancellation_requests,patron,patron.notice_email_address => SUCCESS: Response includes desk, item with _strings, cancellation_requests array, and patron with notice_email_address field 4. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Signed-off-by: Pedro Amorim <pedro.amorim@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=42444 --- Comment #17 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 199677 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199677&action=edit Bug 42444: Convert waiting holds page to API-driven The waiting holds page (circ/waitingreserves.pl) loaded all waiting holds at once server-side, which is slow for libraries with many waiting holds. This patch converts it to use the REST API with DataTables for paginated, client-side rendering. Changes: - circ/waitingreserves.pl: stripped down to auth + POST actions (cancel single, cancel bulk, cancel all expired). Data loading removed entirely. - waitingreserves.tt: replaced server-rendered FOREACH loops with three kohaTable instances calling /api/v1/holds with appropriate JSON query filters: * Holds waiting: status=W, expiration_date >= today * Holds over: status=W, expiration_date < today * Cancellation requests: status=W, has cancellation_requests - Embeds used: patron, patron.category, patron.notice_email_address, biblio, item+strings, item.holding_library, item.home_library, desk, cancellation_requests (last tab only) - Library columns sort by name via embedded relationships - Removes waiting_holds.inc (no longer used anywhere) Note: Shelving location sorting is intentionally disabled. The location value is an authorised value code resolved to a description via item+strings. Server-side sorting by AV description would require embedding the authorised_values table, which is not currently supported by the framework. Test plan: 1. Apply patches (including the [DO NOT PUSH] sample data commit) 2. Populate sample data: $ ktd --shell k$ yarn build ; koha-plack --restart kohadev k$ cd /kohadevbox/koha && perl t/lib/sample_waiting_holds.pl => SUCCESS: Creates 35 waiting holds covering all scenarios 3. Navigate to Circulation > Holds awaiting pickup 4. Verify 'Holds waiting' tab: => SUCCESS: Shows ~28 current holds with pagination => Columns: waiting date, hold date, expiration date, title (with barcode and item type), patron info, libraries, location, call number, copy number, enumeration => Some holds show desk name next to current library => Items with different home/holding branch show 'Cancel hold and return to: <library>' 5. Verify 'Holds waiting past their expiration date' tab: => SUCCESS: Shows 7 expired holds => 'Cancel all' button present and functional 6. Verify 'Holds with cancellation requests' tab: => SUCCESS: Shows 3 holds with cancellation request date column 7. Verify patron column: => Name links to patron detail page => Phone number displayed => Email displayed (uses patron.notice_email_address embed, respects EmailFieldPrimary syspref) => Main contact method label displayed (Primary phone, Primary email, Secondary phone, etc.) 8. Verify sorting works on all sortable columns (server-side via API) 9. Test cancel single hold (form POST, check confirmation message) 10. Test bulk cancel (select multiple via checkboxes, confirm in modal, verify background job enqueued) 11. Test 'Cancel all' on expired holds tab 12. Verify 'View all libraries' link works (allbranches=1) 13. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Pedro Amorim <pedro.amorim@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=42444 --- Comment #18 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 199678 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199678&action=edit Bug 42444: (follow-up) Fix QA regressions in waiting holds page Addresses four regressions reported during QA: 1. Restore mailto subject line 'Hold waiting: [title]' that was dropped in the conversion. Also fixes the encodeURIComponent issue (only encode the subject, not the email address). 2. Respect item-level_itypes syspref: only show item type in the title column when the syspref is OFF (matching old behavior). Uses effective_item_type_id from the API response. 3. Restore total count of holds on each tab. Uses drawCallback to update tab labels with recordsTotal from the API response. 4. Add cardnumber to patron column display, matching the old patron-title.inc output format: 'Surname, Firstname (card)'. Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: Pedro Amorim <pedro.amorim@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=42444 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #199675|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=42444 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com --- Comment #19 from Jonathan Druart <jonathan.druart@gmail.com> ---
Bug 42444: Add missing embeds for waiting holds page
Don't we require tests for this kind of changes? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #20 from Jonathan Druart <jonathan.druart@gmail.com> --- 1. Not blocker but I would have expected the tab content to be loaded on demand. 2. "Cancel all" cancels everything, without confirmation Also note that "Cancel hold" (in the "Actions" column) does not trigger a confirmation, but "Cancel selected" does (asking for a reason) 3. We usually use escape_str instead of escapeHtml, because it takes care of null values. return (data || "").escapeHtml(); Note that here you also remove "0", when escape_str deals with it correctly. Also note that there are variables not escaped in the last column ("Actions") 4. Instead of: ``` let cols = [{ stuff }]; if (condition) { cols.push({other_stuff}); } cols.push({yet_another_stuff}); ``` I would suggest: let cols = [ {stuff}, ...(condition ? [{other_stuff}] : []} {yet_anot_erstuff}, ]; Of course not blocker, but I have used it extensively in the different patches still in the queue (42278, 42332, etc.) 5. data: "patron.surname", Then search on firstname does not work 6. Search on library names in the global search does not work. (search for coded_values and filters_options in includes/html_helpers/tables/items/catalogue_detail.inc or includes/patron-search.inc for examples). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 --- Comment #21 from Jonathan Druart <jonathan.druart@gmail.com> --- Note that bug 42278 is PQA and will add conflict with this change. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|pedro.amorim@openfifth.co.u |jonathan.druart@gmail.com |k | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 --- Comment #22 from Jonathan Druart <jonathan.druart@gmail.com> ---
[DO NOT PUSH] Bug 42444: Sample waiting holds injection script
Please have a look at https://gitlab.com/joubu/koha-plugin-jump/-/merge_requests/10 I have tried to migrate your need to the Koha Jump plugin, I introduced the concept of "modifiers" (under square brackets): $ kj 'build 20 holds' $ kj 'build 20 holds [expired]' $ kj 'build 20 holds [with-cancellation-request]' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |ASSIGNED --- Comment #23 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #20)
1. Not blocker but I would have expected the tab content to be loaded on demand.
I prefer to load them while staff is looking at the initial tab. But I noticed the way I tied the tab title (which includes totals) to the API response produces a flicker. I will fix it by preloading the totals from the pl controller.
2. "Cancel all" cancels everything, without confirmation Also note that "Cancel hold" (in the "Actions" column) does not trigger a confirmation, but "Cancel selected" does (asking for a reason)
That's the original behavior! I can add it a confirmation modal with the reason dialog!
3. We usually use escape_str instead of escapeHtml, because it takes care of null values. return (data || "").escapeHtml();
Note that here you also remove "0", when escape_str deals with it correctly.
100% agreed.
Also note that there are variables not escaped in the last column ("Actions")
4. Instead of: ``` let cols = [{ stuff }]; if (condition) { cols.push({other_stuff}); } cols.push({yet_another_stuff}); ``` I would suggest: let cols = [ {stuff}, ...(condition ? [{other_stuff}] : []} {yet_anot_erstuff}, ];
Of course not blocker, but I have used it extensively in the different patches still in the queue (42278, 42332, etc.)
Will do my best to rewrite that. I like the spread operator.
5. data: "patron.surname", Then search on firstname does not work
Oops, my bad.
6. Search on library names in the global search does not work. (search for coded_values and filters_options in includes/html_helpers/tables/items/catalogue_detail.inc or includes/patron-search.inc for examples).
Right. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 --- Comment #24 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #19)
Bug 42444: Add missing embeds for waiting holds page
Don't we require tests for this kind of changes?
Our coverage on 'embeds' is really sparse. I will add them this time, but we should discuss if we're gonna hard require that and have it documented somewhere if not already. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #199676|0 |1 is obsolete| | Attachment #199677|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=42444 --- Comment #25 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 200936 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200936&action=edit Bug 42444: Sample waiting holds injection script Adds t/lib/sample_waiting_holds.pl which creates 35 waiting holds covering all display scenarios: - 28 current waiting holds (pagination test) - 7 expired waiting holds - 3 holds with cancellation requests - Holds with desk assigned - Items with different home/holding branch (transfer on cancel) - Items with shelving location, call number, copy number, enumchron - Patrons with varied primary_contact_method values - Patrons with email and phone numbers Usage: $ ktd --shell k$ cd /kohadevbox/koha && perl t/lib/sample_waiting_holds.pl Assisted-by: Sonnet 4.6 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 --- Comment #26 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 200937 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200937&action=edit Bug 42444: Add missing embeds for waiting holds page The waiting holds page (waitingreserves.pl) needs data that is not currently exposed through the holds API embeds. This patch adds: - desk: the desk object (name) for holds assigned to a desk - item+strings: item with string representations (library names, location descriptions, item type labels) - cancellation_requests: the actual cancellation request objects with creation_date (the existing cancellation_requested embed only returns a boolean) - patron.notice_email_address: the computed email address used for notices (respects EmailFieldPrimary syspref). Also added as a direct embed on GET /patrons and GET /patrons/{patron_id}. All underlying relationships and methods already exist in Koha::Hold, Koha::Patron, and the DBIC schema. This patch only adds them to the OpenAPI specification enum lists. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove xt/api.t t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass! 3. Verify the new embeds work: GET /api/v1/holds?status=W x-koha-embed: desk,item+strings,cancellation_requests,patron,patron.notice_email_address => SUCCESS: Response includes desk, item with _strings, cancellation_requests array, and patron with notice_email_address field 4. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Signed-off-by: Pedro Amorim <pedro.amorim@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=42444 --- Comment #27 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 200938 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200938&action=edit Bug 42444: Convert waiting holds page to API-driven The waiting holds page (circ/waitingreserves.pl) loaded all waiting holds at once server-side, which is slow for libraries with many waiting holds. This patch converts it to use the REST API with DataTables for paginated, client-side rendering. Changes: - circ/waitingreserves.pl: stripped down to auth + POST actions (cancel single, cancel bulk, cancel all expired). Data loading removed entirely. - waitingreserves.tt: replaced server-rendered FOREACH loops with three kohaTable instances calling /api/v1/holds with appropriate JSON query filters: * Holds waiting: status=W, expiration_date >= today * Holds over: status=W, expiration_date < today * Cancellation requests: status=W, has cancellation_requests - Embeds used: patron, patron.category, patron.notice_email_address, biblio, item+strings, item.holding_library, item.home_library, desk, cancellation_requests (last tab only) - Library columns sort by name via embedded relationships - Removes waiting_holds.inc (no longer used anywhere) Note: Shelving location sorting is intentionally disabled. The location value is an authorised value code resolved to a description via item+strings. Server-side sorting by AV description would require embedding the authorised_values table, which is not currently supported by the framework. Test plan: 1. Apply patches (including the [DO NOT PUSH] sample data commit) 2. Populate sample data: $ ktd --shell k$ yarn build ; koha-plack --restart kohadev k$ cd /kohadevbox/koha && perl t/lib/sample_waiting_holds.pl => SUCCESS: Creates 35 waiting holds covering all scenarios 3. Navigate to Circulation > Holds awaiting pickup 4. Verify 'Holds waiting' tab: => SUCCESS: Shows ~28 current holds with pagination => Columns: waiting date, hold date, expiration date, title (with barcode and item type), patron info, libraries, location, call number, copy number, enumeration => Some holds show desk name next to current library => Items with different home/holding branch show 'Cancel hold and return to: <library>' 5. Verify 'Holds waiting past their expiration date' tab: => SUCCESS: Shows 7 expired holds => 'Cancel all' button present and functional 6. Verify 'Holds with cancellation requests' tab: => SUCCESS: Shows 3 holds with cancellation request date column 7. Verify patron column: => Name links to patron detail page => Phone number displayed => Email displayed (uses patron.notice_email_address embed, respects EmailFieldPrimary syspref) => Main contact method label displayed (Primary phone, Primary email, Secondary phone, etc.) 8. Verify sorting works on all sortable columns (server-side via API) 9. Test cancel single hold (form POST, check confirmation message) 10. Test bulk cancel (select multiple via checkboxes, confirm in modal, verify background job enqueued) 11. Test 'Cancel all' on expired holds tab 12. Verify 'View all libraries' link works (allbranches=1) 13. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Pedro Amorim <pedro.amorim@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=42444 --- Comment #28 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 200939 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200939&action=edit Bug 42444: (follow-up) Add confirmation modal to 'Cancel all' The 'Cancel all' button previously submitted without any confirmation. This patch wires it through the existing cancellation modal so the user must confirm and can optionally provide a cancellation reason. The cancellation reason is passed through to ModReserveCancelAll which already supports it as its third parameter. Test plan: 1. Apply patch 2. Navigate to Circulation > Holds awaiting pickup > expired tab 3. Click 'Cancel all' => SUCCESS: Modal appears with reason dropdown 4. Select a reason and confirm => SUCCESS: All expired holds cancelled with reason recorded 5. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #199198|0 |1 is obsolete| | Attachment #199678|0 |1 is obsolete| | Attachment #200936|0 |1 is obsolete| | Attachment #200937|0 |1 is obsolete| | Attachment #200938|0 |1 is obsolete| | Attachment #200939|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=42444 --- Comment #29 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 200940 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200940&action=edit [DO NOT PUSH] Bug 42444: Sample waiting holds injection script Adds t/lib/sample_waiting_holds.pl which creates 35 waiting holds covering all display scenarios: - 28 current waiting holds (pagination test) - 7 expired waiting holds - 3 holds with cancellation requests - Holds with desk assigned - Items with different home/holding branch (transfer on cancel) - Items with shelving location, call number, copy number, enumchron - Patrons with varied primary_contact_method values - Patrons with email and phone numbers Usage: $ ktd --shell k$ cd /kohadevbox/koha && perl t/lib/sample_waiting_holds.pl Assisted-by: Sonnet 4.6 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 --- Comment #30 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 200941 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200941&action=edit Bug 42444: Add missing embeds for waiting holds page The waiting holds page (waitingreserves.pl) needs data that is not currently exposed through the holds API embeds. This patch adds: - desk: the desk object (name) for holds assigned to a desk - item+strings: item with string representations (library names, location descriptions, item type labels) - cancellation_requests: the actual cancellation request objects with creation_date (the existing cancellation_requested embed only returns a boolean) - patron.notice_email_address: the computed email address used for notices (respects EmailFieldPrimary syspref). Also added as a direct embed on GET /patrons and GET /patrons/{patron_id}. All underlying relationships and methods already exist in Koha::Hold, Koha::Patron, and the DBIC schema. This patch only adds them to the OpenAPI specification enum lists. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove xt/api.t t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass! 3. Verify the new embeds work: GET /api/v1/holds?status=W x-koha-embed: desk,item+strings,cancellation_requests,patron,patron.notice_email_address => SUCCESS: Response includes desk, item with _strings, cancellation_requests array, and patron with notice_email_address field 4. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Signed-off-by: Pedro Amorim <pedro.amorim@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=42444 --- Comment #31 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 200942 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200942&action=edit Bug 42444: Convert waiting holds page to API-driven The waiting holds page (circ/waitingreserves.pl) loaded all waiting holds at once server-side, which is slow for libraries with many waiting holds. This patch converts it to use the REST API with DataTables for paginated, client-side rendering. Changes: - circ/waitingreserves.pl: stripped down to auth + POST actions (cancel single, cancel bulk, cancel all expired). Data loading removed entirely. - waitingreserves.tt: replaced server-rendered FOREACH loops with three kohaTable instances calling /api/v1/holds with appropriate JSON query filters: * Holds waiting: status=W, expiration_date >= today * Holds over: status=W, expiration_date < today * Cancellation requests: status=W, has cancellation_requests - Embeds used: patron, patron.category, patron.notice_email_address, biblio, item+strings, item.holding_library, item.home_library, desk, cancellation_requests (last tab only) - Library columns sort by name via embedded relationships - Removes waiting_holds.inc (no longer used anywhere) Note: Shelving location sorting is intentionally disabled. The location value is an authorised value code resolved to a description via item+strings. Server-side sorting by AV description would require embedding the authorised_values table, which is not currently supported by the framework. Test plan: 1. Apply patches (including the [DO NOT PUSH] sample data commit) 2. Populate sample data: $ ktd --shell k$ yarn build ; koha-plack --restart kohadev k$ cd /kohadevbox/koha && perl t/lib/sample_waiting_holds.pl => SUCCESS: Creates 35 waiting holds covering all scenarios 3. Navigate to Circulation > Holds awaiting pickup 4. Verify 'Holds waiting' tab: => SUCCESS: Shows ~28 current holds with pagination => Columns: waiting date, hold date, expiration date, title (with barcode and item type), patron info, libraries, location, call number, copy number, enumeration => Some holds show desk name next to current library => Items with different home/holding branch show 'Cancel hold and return to: <library>' 5. Verify 'Holds waiting past their expiration date' tab: => SUCCESS: Shows 7 expired holds => 'Cancel all' button present and functional 6. Verify 'Holds with cancellation requests' tab: => SUCCESS: Shows 3 holds with cancellation request date column 7. Verify patron column: => Name links to patron detail page => Phone number displayed => Email displayed (uses patron.notice_email_address embed, respects EmailFieldPrimary syspref) => Main contact method label displayed (Primary phone, Primary email, Secondary phone, etc.) 8. Verify sorting works on all sortable columns (server-side via API) 9. Test cancel single hold (form POST, check confirmation message) 10. Test bulk cancel (select multiple via checkboxes, confirm in modal, verify background job enqueued) 11. Test 'Cancel all' on expired holds tab 12. Verify 'View all libraries' link works (allbranches=1) 13. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Pedro Amorim <pedro.amorim@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=42444 --- Comment #32 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 200943 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200943&action=edit Bug 42444: (follow-up) Add confirmation modal to 'Cancel all' The 'Cancel all' button previously submitted without any confirmation. This patch wires it through the existing cancellation modal so the user must confirm and can optionally provide a cancellation reason. The cancellation reason is passed through to ModReserveCancelAll which already supports it as its third parameter. Test plan: 1. Apply patch 2. Navigate to Circulation > Holds awaiting pickup > expired tab 3. Click 'Cancel all' => SUCCESS: Modal appears with reason dropdown 4. Select a reason and confirm => SUCCESS: All expired holds cancelled with reason recorded 5. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 --- Comment #33 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- I squashed things a bit. I think I covered all. I'll explore the jump plugin, sounds like it will be very helpful. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 --- Comment #34 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- *** Bug 41782 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Circulation| |Holds function| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43017 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43017 [Bug 43017] [OMNIBUS] Interface optimization -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42444 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|42643 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42643 [Bug 42643] [OMNIBUS] Assorted performance and stability work -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org