Bug 41035 - bundle_remove click handler in returns.tt has invalid path component "item"
Summary: bundle_remove click handler in returns.tt has invalid path component "item"
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Paul Derscheid
QA Contact: Brendan Lawlor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-16 16:46 UTC by Paul Derscheid
Modified: 2026-01-30 17:56 UTC (History)
4 users (show)

See Also:
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' (1.51 KB, patch)
2025-10-16 16:56 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 41035: remove invalid path component 'item' (1.56 KB, patch)
2025-12-20 11:01 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 41035: remove invalid path component 'item' (1.61 KB, patch)
2026-01-29 18:52 UTC, Brendan Lawlor
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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