Bug 41035

Summary: bundle_remove click handler in returns.tt has invalid path component "item"
Product: Koha Reporter: Paul Derscheid <paul.derscheid>
Component: CirculationAssignee: Paul Derscheid <paul.derscheid>
Status: Pushed to main --- QA Contact: Brendan Lawlor <blawlor>
Severity: normal    
Priority: P5 - low CC: blawlor, gmcharlt, kyle, Laura.escamilla
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
26.05.00
Circulation function:
Attachments: Bug 41035: remove invalid path component 'item'
Bug 41035: remove invalid path component 'item'
Bug 41035: remove invalid path component 'item'

Description Paul Derscheid 2025-10-16 16:46:40 UTC
The problem is that "...bundled_items/item/{bundled_item_id}" gives 404, should just be "bundled_items/{bundled_item_id}".
Comment 1 Paul Derscheid 2025-10-16 16:56:49 UTC
Created attachment 188019 [details] [review]
Bug 41035: remove invalid path component 'item'

To test:
1. Create a record as a collection with leader 007 set to c
2. Add some items on the same branch to the bundle
3. Check one item in
4. Observe that you get a 404 error and the item is not removed from
   the bundle
5. Apply the patch
6. Repeat step 3
7. Observe that the item is correctly removed (unlinked) from the
   bundle
8. Sign off
Comment 2 Roman Dolny 2025-12-20 11:01:39 UTC
Created attachment 190652 [details] [review]
Bug 41035: remove invalid path component 'item'

To test:
1. Create a record as a collection with leader 007 set to c
2. Add some items on the same branch to the bundle
3. Check one item in
4. Observe that you get a 404 error and the item is not removed from
   the bundle
5. Apply the patch
6. Repeat step 3
7. Observe that the item is correctly removed (unlinked) from the
   bundle
8. Sign off

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 3 Brendan Lawlor 2026-01-29 18:52:00 UTC
Created attachment 192192 [details] [review]
Bug 41035: remove invalid path component 'item'

To test:
1. Create a record as a collection with leader 007 set to c
2. Add some items on the same branch to the bundle
3. Check one item in
4. Observe that you get a 404 error and the item is not removed from
   the bundle
5. Apply the patch
6. Repeat step 3
7. Observe that the item is correctly removed (unlinked) from the
   bundle
8. Sign off

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Comment 4 Brendan Lawlor 2026-01-29 18:54:20 UTC
This works and is consistent with how the items API defines the endpoint for remove from bundle:

"/items/{item_id}/bundled_items/{bundled_item_id}":
  delete:
    x-mojo-to: Items#remove_from_bundle
    operationId: removeFromBundle
    tags:
      - items
    summary: Remove item from bundle

Nice work. Passing QA
Comment 5 Brendan Lawlor 2026-01-29 18:58:17 UTC
Testing note:

You can use the following leader to create the record:
00000npc a2200000   4500
Comment 6 Lucas Gass (lukeg) 2026-01-30 17:56:25 UTC
Nice work everyone!

Pushed to main for 26.05