[Bug 29902] New: While upgrading all empty deleteditems.datelastborrowed turned deleteditems.timestamp to date of upgrade
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29902 Bug ID: 29902 Summary: While upgrading all empty deleteditems.datelastborrowed turned deleteditems.timestamp to date of upgrade Change sponsored?: --- Product: Koha Version: 19.05 Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Installation and upgrade (command-line installer) Assignee: koha-bugs@lists.koha-community.org Reporter: edv@hoernergruppe.de QA Contact: testopia@bugs.koha-community.org After upgrading from 19.06 to latest we recognized in our deleted items report a wrong amount of deleted items for 2021. Digging onto the problem we found, that every dataset in deleteditems with an empty deleteditems.datelastborrowed field, caused a deleteditems.timestamp set to the actual date by overwriting the former content of the field. We got the former content back by importing additionally the old database so called "koha_library_old" and the follwing SQL request (2021-12-01 was the date of our upgrade) UPDATE koha_library.deleteditems, koha_library_old.deleteditems SET koha_library.deleteditems.timestamp = koha_library_old.deleteditems.timestamp WHERE koha_library.deleteditems.barcode = koha_library_old.deleteditems.barcode AND koha_library.deleteditems.timestamp LIKE '2021-12-01%'; -- 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=29902 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- Hi, Maybe this comes from Bug 23081. It changes value of deleteditems.issues : $DBversion = '19.12.00.080'; if( CheckVersion( $DBversion ) ) { $dbh->do( "UPDATE items set issues=0 where issues is null" ); $dbh->do( "UPDATE deleteditems set issues=0 where issues is null" ); This impact on deleteditems.timestamp is an unwanted side effect. I don't know if it is technically possible to avoid it. -- 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=29902 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- It is technically possible if you include the timestamp in the update statement I think, set timestamp = timestamp or something like that. We have had the issue before... just don't remember the bug, it's been a longer while. -- 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=29902 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23081 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Wish now I had remembered this one. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23081 [Bug 23081] Make items.issues and deleteditems.issues default to 0 instead of null -- 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=29902 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|NEW |RESOLVED --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- A little too late to fix this update since the version in question is no longer maintained. Something to keep in mind still for new updates. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org