[Bug 43306] New: Migrate catalogue/detail.tt to use api-client.js for bundled items
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43306 Bug ID: 43306 Summary: Migrate catalogue/detail.tt to use api-client.js for bundled items Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Depends on: 34451 Target Milestone: --- catalogue/detail.tt uses raw jQuery.ajax() for DELETE calls to /api/v1/items/.../bundled_items/.... These need to be migrated to api-client.js for proper CSRF token handling (bug 34451). -- 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=43306 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 watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43306 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- 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=43306 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 203676 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203676&action=edit Bug 43306: Migrate catalogue/detail.tt to use api-client.js for bundled items This patch replaces raw jQuery.ajax() DELETE calls for unbundling items with the api-client.js pattern. Changes: - Add bundled_items.remove method to ItemAPIClient (accepts params for return_response override) - Replace inline table unlink button DELETE call - Replace modal-based remove-from-bundle DELETE call, preserving the detailed error handling (409/404 status checks) by using return_response: true to get the raw Response object Test plan: 1. Apply patch 2. Go to a record with bundled items 3. Click the unlink button on a bundled item in the items table => SUCCESS: Item removed from bundle 4. Open the "Remove from bundle" modal, scan a barcode => SUCCESS: Item removed, success message shown 5. Test error cases (checked out bundle, non-existent barcode) => SUCCESS: Appropriate error messages displayed 6. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org