Bug 31460

Summary: Merging biblio records with attached item groups losing groups
Product: Koha Reporter: Kelly McElligott <kelly>
Component: CatalogingAssignee: Nick Clemens (kidclamp) <nick>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrew, blawlor, george, hebah, m.de.rooy, mnero, nick, phillip.berg
Version: unspecified   
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:    
Attachments: Bug 31460: Merge item groups when merging records
Bug 31460: Merge item groups when merging records

Description Kelly McElligott 2022-08-25 11:32:38 UTC
With the new feature of Item Groups, if a library merges two records together, both having Items with Item Groups attached, the merge will only retain the Item Group on the Kept Record. It would be beneficial to libraries that all item information including groups is retained in a merge. 

Test:
1. Have a record (A) with 3 items.  
2. Create an item group with 2 of these items.
3. Have a second record (B) with 4 items
4. Create an item group with 2 of these items.
5. Merge the two records together keeping record A
6. Results will show that all items are moved over to record A, but the item group from record B, is not there.
Comment 1 Miranda Nero 2025-07-22 16:22:32 UTC
We are encountering this bug frequently. This is especially cumbersome when there are item group-level holds on the records. We have been manually reassigning the item groups when there are only a handful of items the records being merged but have had to open tickets to get Bywater's assistance on records with larger numbers of records attached. Sometimes the description of the item group comes over with the item, so on the holdings tab it looks like the items are in an item group, but the item group doesn't exist.
Comment 2 Phillip Berg 2025-09-03 13:43:29 UTC
Agreed. This is something that is especially painful the larger the library system/consortium is.
Comment 3 Nick Clemens (kidclamp) 2025-09-04 12:28:35 UTC
Created attachment 186142 [details] [review]
Bug 31460: Merge item groups when merging records

Test:
1. Have a record (A) with 3 items.
2. Create an item group with 2 of these items.
3. Have a second record (B) with 4 items
4. Create an item group with 2 of these items.
5. Merge the two records together keeping record A
6. Results will show that all items are moved over to record A, but the item group from record B, is not there.
7. Apply patch
8. Create a new record (C) with 3 items.
9. Create an item group with 2 of these items
10. Merge this into record A
11. The item groups are moved!
Comment 4 Biblibre Sandboxes 2025-09-04 18:58:29 UTC
Created attachment 186178 [details] [review]
Bug 31460: Merge item groups when merging records

Test:
1. Have a record (A) with 3 items.
2. Create an item group with 2 of these items.
3. Have a second record (B) with 4 items
4. Create an item group with 2 of these items.
5. Merge the two records together keeping record A
6. Results will show that all items are moved over to record A, but the item group from record B, is not there.
7. Apply patch
8. Create a new record (C) with 3 items.
9. Create an item group with 2 of these items
10. Merge this into record A
11. The item groups are moved!

Signed-off-by: Miranda <mnero@oslri.net>