[Bug 30392] New: Add a deleted_on column to deleteditems
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Bug ID: 30392 Summary: Add a deleted_on column to deleteditems Change sponsored?: --- Product: Koha Version: 20.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Bug 23081 did an udpate on the data in deleteditems resulting in a lot of timestamps being reset, leaving libraries without the cataloguing log without any information about when the item was deleted. To avoid this in the future, it would be much better to have a separate column to store the deletion date of an item. The catalouging log is not always a good option in big libraries as we don't differentiate between item, bibliographic and authority record updates, so it creates a lot of data and it might also be deleted in some. The information about when an item was deleted is needed in some libraries to avoid having to document this on paper in an inventory book and as such should be saved in a save spot. -- 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=30392 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Anneli Österman <anneli.osterman@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anneli.osterman@koha-suomi. | |fi --- Comment #1 from Anneli Österman <anneli.osterman@koha-suomi.fi> --- I strongly support the idea to add deleted_on column! -- 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=30392 paxed <pasi.kallinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pasi.kallinen@koha-suomi.fi --- Comment #2 from paxed <pasi.kallinen@koha-suomi.fi> --- Deletion time information is very important for statistics reason, AND SHOULD NOT CHANGE. This ON UPDATE is messing up weeding stats for the libraries. -- 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=30392 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|20.11 |master -- 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=30392 Jason Robb <jrobb@sekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jrobb@sekls.org --- Comment #3 from Jason Robb <jrobb@sekls.org> --- This is very much needed. We currently don't keep logs past 6 months due to our size but need to be able to report annually on how many items each branch has weeded. The only way to do that at present is by counting deleted items based on timestamp, so when that table gets updated and the timestamps change, we lose the ability to accurately retrieve that information. -- 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=30392 mathieu saby <mathsabypro@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mathsabypro@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31190 -- 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=30392 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=30392 --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 138073 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138073&action=edit Bug 30392: Set deleted_on when an item is (marked as) deleted We could like to track down when an item has been moved to the deleteditems table. Test plan: Created a new item, delete it Not that the deleteditems.deleted_on value is set correctly -- 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=30392 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- What about existing deleteditems rows? Setting deleted_on=timestamp (but might be wrong), or 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=30392 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com -- 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=30392 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Maybe NULL is better, we messed with the date in a recent update, so they are most likely wrong. We can still use COALESCE in reports if needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Katrin Fischer from comment #6)
Maybe NULL is better, we messed with the date in a recent update, so they are most likely wrong. We can still use COALESCE in reports if needed.
What does the patch then. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jonathan Druart from comment #7)
(In reply to Katrin Fischer from comment #6)
Maybe NULL is better, we messed with the date in a recent update, so they are most likely wrong. We can still use COALESCE in reports if needed.
What does the patch then.
Not sure I understand. The idea is to give a reliable date, that is not accidentally overwritten by changes to deleteditems (as we did in the last update, which triggered the timestamp). And we start with NULL for the old entries (would be my suggestion) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- So yes, it's what the patch does :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 --- Comment #10 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- I tried to test this on a sandbox, but even if I "Refresh Schema", there is no deleted_on column in deleteditems. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- You are right, Caroline, the patch is missing the database update bits. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 --- Comment #12 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 138115 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138115&action=edit bug 30392: DB changes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 --- Comment #13 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Oops, sorry, I forgot to attach one patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 --- Comment #14 from Anneli Österman <anneli.osterman@koha-suomi.fi> --- I tested in Bywater's sandbox. If I deleted item via batch item delete (backgroun jobs), it is deleted but deleted_on is empty in deleteditems table. If I delete the item from "additem.pl?op=edititem&biblionumber=" page (Actions -> Delete) I get this error message: DBIx::Class::Row::store_column(): No such column 'deleted_on' on Koha::Schema::Result::Deleteditem at /kohadevbox/koha/Koha/Item.pm line 341 at /usr/share/perl5/DBIx/Class/Exception.pm line 77 There is deleted_on column on items and deleteditems table. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Anneli, are you testing using the sandboxes or ktd? If ktd, run: dbic If sandboxes, got to Actions > Refresh schema This should hopefully make the error go away. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Anneli Österman <anneli.osterman@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #16 from Anneli Österman <anneli.osterman@koha-suomi.fi> --- Katrin, thanks, refreshing the schema helped! :) There is a deleted_on column on both items and deleteditems table and it is updated when item is deleted (regardless of the method used, batch delete or actions/delete in modify page.) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138073|0 |1 is obsolete| | --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 138232 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138232&action=edit Bug 30392: Set deleted_on when an item is (marked as) deleted We could like to track down when an item has been moved to the deleteditems table. Test plan: Created a new item, delete it Not that the deleteditems.deleted_on value is set correctly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 138233 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138233&action=edit Bug 30392: DB changes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138232|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138233|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138115|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 --- Comment #19 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 138481 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138481&action=edit bug 30392: DB changes Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 --- Comment #20 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 138482 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138482&action=edit Bug 30392: Set deleted_on when an item is (marked as) deleted We could like to track down when an item has been moved to the deleteditems table. Test plan: Created a new item, delete it Not that the deleteditems.deleted_on value is set correctly Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 --- Comment #21 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 138483 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138483&action=edit Bug 30392: (QA follow-up) Correct COMMENT Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 --- Comment #22 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 --- Comment #23 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 138500 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138500&action=edit Bug 30392: (QA follow-up) Remove deleted_on from the API response Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Needs documenting CC| |lucas@bywatersolutions.com --- Comment #24 from Lucas Gass <lucas@bywatersolutions.com> --- Enhancement will not be backported to 22.05.x series -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cbrannon@cdalibrary.org --- Comment #25 from Christopher Brannon <cbrannon@cdalibrary.org> --- This is a good step for https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20271 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=20271 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30392 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #26 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Not sure what needs to be documented here. It doesn't affect the user interface. I'm closing, but feel free to reopen with more details as to what needs to be added to the manual. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org