[Bug 36345] New: Deleting related things causes data loss for old_reserves
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@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36345 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |30648 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30648 [Bug 30648] Title is lost in holds history when biblio is deleted -- 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=36345 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=36101 -- 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=36345 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrewfh@dubcolib.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36345 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think this is the solution for bug 36101, but I am not sure about doubling up the data. We could imagine having a FK on deleteditems if we add the information on delete for example. -- 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=36345 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #1)
I think this is the solution for bug 36101, but I am not sure about doubling up the data. We could imagine having a FK on deleteditems if we add the information on delete for example.
-- 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=36345 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Kyle? :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36345 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #3)
Kyle? :)
I was ready to write a against your suggestion when I decided you were correct and i just changed the see also (iirc) while forgetting about the reply box being populated. We'd need a hook of some kind to handle this either way. If we do it my way, it's a minimum of one hook firing. Doing it at "deletion" time, it's also a maximum of one hook firing :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36345 Katie Bliss <kebliss@dmpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kebliss@dmpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36345 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Kyle M Hall from comment #4)
(In reply to Katrin Fischer from comment #3)
Kyle? :)
I was ready to write a against your suggestion when I decided you were correct and i just changed the see also (iirc) while forgetting about the reply box being populated. We'd need a hook of some kind to handle this either way. If we do it my way, it's a minimum of one hook firing. Doing it at "deletion" time, it's also a maximum of one hook firing :)
Ah! But hope you now I would not have minded if you had disagreed - it's about to find the best way forward :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36345 Bug 36345 depends on bug 30648, which changed state. Bug 30648 Summary: Title is lost in holds history when bibliographic record is deleted https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30648 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org