Bug 26275

Summary: Deleting item should not automatically delete group
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: CatalogingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: kyle, m.de.rooy, martin.renvoize, mnero
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 24857    
Bug Blocks:    

Description Andrew Fuerste-Henry 2020-08-21 15:15:43 UTC
To recreate:
- create a bib
- add an item
- create a volume
- add item to volume
- in the Holdings table on detail.pl, check the box to select your item and pick Delete selected items
- on the next page, do not check "Delete records if no items remain"
- click Delete selected items
- return to your bib. the item and volume are both gone

I don't think we should automatically delete the volume when removing the last item. I'd like to see another check box on the batch deletion screen -- "delete volumes if no items remain" to parallel "delete records if no items remain"
Comment 1 Kyle M Hall (khall) 2020-08-21 15:30:29 UTC
That functionality was actually a specific request from the sponsor. If we want to change it, we'll need to use a syspref.
Comment 2 Katrin Fischer 2023-09-22 20:06:06 UTC
I think deleting the volume with the last item makes sense, but maybe I am missing a use case here?
Comment 3 Miranda Nero 2025-03-28 17:29:28 UTC
If there is a hold on the item group that gets automatically deleted, the hold reverts to "next available item," which is not what a patron would want. Also, moving the last item in one item group to a different one, leaves behind an empty item group without deleting it. I would prefer this be a system preference with the option to batch delete empty item groups rather than have some automatically delete and some get left behind, although that might be a separate bug.