Bug 26275 - Deleting item should not automatically delete group
Summary: Deleting item should not automatically delete group
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 24857
Blocks:
  Show dependency treegraph
 
Reported: 2020-08-21 15:15 UTC by Andrew Fuerste-Henry
Modified: 2025-03-28 17:29 UTC (History)
4 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

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