[Bug 32729] New: Deleting an item removes the itemnumber from old_issues when it probably should not
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32729 Bug ID: 32729 Summary: Deleting an item removes the itemnumber from old_issues when it probably should not Change sponsored?: --- Product: Koha Version: 22.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com I ran across this when troubleshooting lifetime savings on ISSUESLIPs. To recreate: 1. Checkout an item and check it back in. 2. Look at the old_issues tabe ( select itemnumber from old_issues; ) 3. See the itemnumber 4. Delete the item. 5. Check old_issues again, the itemnumber is now NULL. -- 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=32729 Cab Vinton <bibliwho@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bibliwho@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32729 --- Comment #1 from Cab Vinton <bibliwho@gmail.com> --- Unless there's a good reason for this data loss, the itemnumber should be preserved. If I've understood things correctly, resolving this issue would make it possible to calculate an accurate running total of savings based on the value of a patron's checkouts, i.e., a total that includes values for items that have been deleted. Cab Vinton/ Plaistow Public Library -- 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=32729 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|22.05 |master -- 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=32729 Lisette Scheer <lisette.scheer@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette.scheer@bywatersolut | |ions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32729 Lari Strand <lmstrand@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lmstrand@gmail.com --- Comment #2 from Lari Strand <lmstrand@gmail.com> --- (In reply to Cab Vinton from comment #1)
Unless there's a good reason for this data loss, the itemnumber should be preserved.
I agree. We need this information for reports and finding out biblio details based on the itemnumber in the old_issues table etc. I propose we remove the constraint: CONSTRAINT `old_issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL, from old_issues-table. Same goes for old_reserves-table (propably should make a new ticket?): CONSTRAINT `old_reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL, These tables are archive tables and I think this information should be preserved. I can't justify the data loss with any good reason. -- 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=32729 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=32729 Lari Strand <lmstrand@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Circulation |Database --- Comment #3 from Lari Strand <lmstrand@gmail.com> --- Created another ticket for the same issue for old_reserves: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36101 -- 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=32729 Lari Strand <lmstrand@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|NEW |Needs Signoff -- 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=32729 --- Comment #4 from Lari Strand <lmstrand@gmail.com> --- Created attachment 163019 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163019&action=edit Bug 32729: Drop constraint to items.itemnumber from old_issues-table This patch removes the constraint from old_issues table to the items table so a deleted item's itemnumber will be preserved in the old issues table. To test: 1. Apply patch 2. run updatedatabase.pl 3. Check constraint old_issues_ibfk_2 has been dropped -- 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=32729 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=32729 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emmi.takkinen@koha-suomi.fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32729 Lari Strand <lmstrand@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lmstrand@gmail.com |ity.org | -- 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=32729 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32729 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32729 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163019|0 |1 is obsolete| | --- Comment #5 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 163939 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163939&action=edit Bug 32729: Drop constraint to items.itemnumber from old_issues-table Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32729 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |blawlor@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32729 --- Comment #6 from Brendan Lawlor <blawlor@clamsnet.org> --- Test notes: updatedatabase DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug_32729.pl [14:30:50]: Bug 32729 - Drop constraint to items.itemnumber from old_issues-table Dropped constraint old_issues_ibfk_2 from old_issues Checked items out and back in, deleted items and ran report to confirm that the itemnumber is retained. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32729 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- I'm wondering if we should add an deleted_itemnumber column ala Bug 22421 as an alternative. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32729 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Failing QA. I think my suggestion from comment 7 is the way to go since we've already established the pattern in Koha. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32729 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Kyle M Hall from comment #8)
Failing QA. I think my suggestion from comment 7 is the way to go since we've already established the pattern in Koha.
We have the same in aqorders now, so I think we can call it a pattern now. This case might still be a little different, as issues and old_issues I believe need to have the same structure/columns in order to work correctly. But... having deleted_itemnumber in issues might also be a good thing? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org