[Bug 44331] New: Merging records deletes the merged record's bookings, recalls and course reserves
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44331 Bug ID: 44331 Summary: Merging records deletes the merged record's bookings, recalls and course reserves Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: babarjunaid1122@gmail.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Target Milestone: --- Koha::Biblio->merge_with moves the merged record's items, item groups, article requests, subscriptions, serials, suggestions, orders and holds to the record kept, then deletes the merged record. Bookings (bookings.biblio_id), recalls (recalls.biblio_id) and course reserves (course_items.biblionumber) are ON DELETE CASCADE and are not moved, so they are deleted, although their items were moved to the record kept. To reproduce (main): 1. Record 2 has an item with a booking, a recall, and the item on a course reserve. 2. Merge record 2 into record 1. 3. The item is on record 1, but the booking, the recall and the course reserve are gone. The new subtest 'move bookings, recalls and course reserves' in t/db_dependent/Koha/Biblio.t fails without the patch. Lists are bug 34200 and local cover images bug 31181. See Also 34200, 31181. Note for testers: on main, Biblio.t already fails 'no warnings' in KTD without this patch. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44331 --- Comment #1 from babar junaid <babarjunaid1122@gmail.com> --- Created attachment 212774 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212774&action=edit Bug 44331: Keep bookings, recalls and course reserves when merging records Bug 44331: Keep bookings, recalls and course reserves when merging records Koha::Biblio->merge_with() moves the merged record's items, holds, orders and other rows to the record kept, then deletes the merged record. Bookings, recalls and course reserves point at the record with ON DELETE CASCADE and were not moved, so they were deleted although their items had moved to the record kept. They are now moved with the items. Test plan: 1. Apply only the test file change and run prove t/db_dependent/Koha/Biblio.t The new subtest "move bookings, recalls and course reserves" (in "merge of records") fails: the booking, the recall and the course reserve are gone after the merge. 2. Apply the whole patch and run it again: it passes. Note: 'no warnings' already fails on main in KTD without this patch. Sponsored-by: Koha Solutions -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44331 babar junaid <babarjunaid1122@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |babarjunaid1122@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44331 babar junaid <babarjunaid1122@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=34200, | |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31181 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org