From d80ca5f4e844ec85621ce8865bcb686dcf6549aa Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 7 Jul 2026 10:14:35 +0200 Subject: [PATCH] Bug 42875: Correct failure message when adding an item to a bundle If bc_1 is checked out and I try to add bc_2 I get: "Failure: Item 'bc_2' belongs to another bundle" It should be: "Failure: Bundle is currently checked out" Test plan (using KTD): 1. Pick a record with items, for example: The definitive guide to Catalyst (146) 2. Edit the record and change 000 (the leader): - Click the tag editor - Change "7- Bibliographic level" to "C- Collection" 3. In the holdings table there is now a "Manage bundle (0|0)" option in the far right column for each item. 4. Check an item out for the record out, for example I checked out 39999000006117 to Mary Burton. 5. In the holdings table for the record, click on "Manage bundle" for the item you checked out (39999000006117). 6. In the expanded text area below the item row, click "+ Add to bundle". 7. In pop-up window, enter 39999000006131 "Item barcode" field (this is one of the other items for the record that is not checked out). 8. Click Submit. 9. You get an error: Failure: Item '39999000006131' belongs to another bundle 10. Apply the patch. 11. Restart everything: restart all 12. Hard refresh the page for the record. 13. Repeat steps 5 to 8. 14. You now get the correct error: "Failure: Bundle is currently checked out" Signed-off-by: David Nind Signed-off-by: Nick Clemens Signed-off-by: Pedro Amorim --- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index b6f03e1d95..229acb28ea 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -2039,7 +2039,7 @@ if (response.status === 409) { if (responseJSON.error_code === "already_bundled") { $("#addResult").replaceWith('
' + _("Warning: Item '%s' already attached").format(barcode) + "
"); - } else if (responseJSON.error_code === "bundle_checkout_out") { + } else if (responseJSON.error_code === "bundle_checked_out") { $("#addResult").replaceWith('
' + _("Failure: Bundle is currently checked out") + "
"); } else if (responseJSON.error_code === "checked_out") { const button = $('