[Bug 43309] New: Migrate circ/returns.tt to use api-client.js
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43309 Bug ID: 43309 Summary: Migrate circ/returns.tt to use api-client.js 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: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com Depends on: 34451 Target Milestone: --- circ/returns.tt uses raw jQuery.ajax() for DELETE calls to /api/v1/items/.../bundled_items/... and POST calls to /api/v1/patrons/.../hold_groups/.../cancel. These need to be migrated to api-client.js for proper CSRF token handling (bug 34451). -- 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=43309 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34451 Depends on|34451 | -- 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=43309 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Patch complexity|--- |Small patch -- 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=43309 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 203756 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203756&action=edit Bug 43309: Migrate circ/returns.tt to use api-client.js This patch replaces raw jQuery.ajax() calls in circ/returns.tt with api-client.js for proper CSRF token handling. Changes: - Replace bundled items DELETE with APIClient.item.bundled_items.remove - Replace hold group cancel POST with APIClient.default.koha.post Test plan: 1. Apply patch 2. Check in a bundled item with a missing component => Click "Remove from bundle" on the alert => SUCCESS: Alert removed, item unlinked 3. Check in an item with a hold group => Click "Cancel hold group" => SUCCESS: Page reloads, hold group cancelled 4. 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=43309 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Status|Needs Signoff |Failed QA --- Comment #2 from David Nind <david@davidnind.com> --- I've Failed QA as clicking on "- Remove from bundle" does nothing and there is an error in the web development tools console: api-client.js:151 Uncaught (in promise) TypeError: API client property is not callable Also, for step 3, I couldn't work out how to get the "Cancel hold group" (which I think should be "Cancel all holds in hold group") to show. Setting up a bundle: 1. Edit a record with multiple items, set leader 7=collection (I used Perl template toolkit (255)) 2. Change the home and current library for some items so that there are several items for the same library - these should all be Centerville: - 39999000011111 (Centerville already) - 39999000011135 (Centerville already) - 39999000011074 3. Click "Manage bundle" for an item, and add two additional items to the bundle: - 39999000011135 - 39999000011074 4. Click "Submit" (then "Close" when finished adding items to the bundle) 5. Mark one of the items so it is missing: - 39999000011135 (1 - Lost status = Missing) 6. Check in one of the items from the bundle: 39999000011135 Setting up a hold group (as far as I've got): 1. Enable the DisplayAddHoldGroups system preference. 2. Search in the staff interface, for example: perl 3. Select several records, then click "Hold", for example: - Programming Perl - CGI programming with Perl - Intermediate Perl 4. Choose a patron to place the hold for, for example Mary Burton. 5. Click the checkbox "Treat as hold group" 6. Select a pickup location for the records, for example Centerville 7. Click "Place holds". 8. ... can't work out how to get "Cancel hold group" (which I think should be "Cancel all holds in hold group") to show: - checking in an item in the hold group? - checking out an item in the hold group? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org