[Koha-bugs] [Bug 36345] New: Deleting related things causes data loss for old_reserves
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Mar 18 15:46:21 CET 2024
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36345
Bug ID: 36345
Summary: Deleting related things causes data loss for
old_reserves
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: koha-bugs at lists.koha-community.org
Reporter: kyle at bywatersolutions.com
QA Contact: testopia at bugs.koha-community.org
The old_reserves table is meant to be a historical preservation of data.
Currently it has foreign keys a number of tables where that also have a
delete/old table for preservation.
For example, we may have an "old reserve" with an associated item. When we
delete that item, the item is moved to the deleteditems, and
old_reserves.itemnumber is set to NULL thus losing the associated item even
though we still have the item data! This is true for borrowers, bibs and items.
To enable saving this data, we should add a non FK column for each related
table that has a delete/old version of that table. Then, when the associated
item is deleted, copy the FK value to the new column before is is nullified. In
fact, if we populated those columns when moving the hold from reserves to
old_reserves, we wouldn't even have to add code to each of the delete methods!
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list