Bug 8926

Summary: deletedborrowers should have a timestamp
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: DatabaseAssignee: Galen Charlton <gmcharlt>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P5 - low CC: elibris.helpdesk, george, katrin.fischer, m.de.rooy, tmisilo
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10459
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Nicole C. Engard 2012-10-16 14:49:24 UTC
Most of the deleted* tables have a timestamp so you can find things deleted in a timeframe, but deletedborrowers doesn't have that. It should.
Comment 1 e-Libris Technologies 2013-03-18 15:43:28 UTC
I agree. Without a timestamp there is no way for libraries to count the number of deleted patron records in a given time period for reporting purposes.
Comment 2 Katrin Fischer 2013-03-21 23:05:51 UTC
I think if you have the borrower log turned on in system preferences you can find out the number using the log viewer.
Comment 3 e-Libris Technologies 2013-03-22 11:49:50 UTC
How do you use the log viewer to create a saved report which lets library staff run reports to get counts of deleted borrowers? Many libraries need this information for annual reports.
Comment 4 Katrin Fischer 2013-03-22 12:00:08 UTC
The log viewer is build on top of the action_log or/and statistics table (not quite sure ther) - was just trying to say that the information is there :)
Comment 5 George Williams (NEKLS) 2016-12-02 21:49:39 UTC
I agree, there should be a timestamp field on the deletedborrowers table.  I'm willing to bet that the reason there isn't is because there isn't a timestamp on the borrowers table to begin with.  All of the other deleted* tables as well as old_issues and old_reserves have timestamps because their corresponding tables all have timestamps.

That being said, I did read this before I sat down to write this comment and, based on Katrin's comment, I wrote a report that can get a count of deleted borrowers based on the data in the action logs.  It's on the Wiki if anyone needs it (like I did a couple of hours ago when I started poking around in the first place).

The value of the timestamp field in borrowers and deletedborrowers would come from making a report like this possible for libraries that don't have the BorrowersLog system preference turned on.
Comment 6 Marcel de Rooy 2016-12-03 11:39:05 UTC
What about this:

CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrowers you have deleted
[...]
  `updated_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- time of last change could be useful for synchronization with external systems (among others)

See also bug 10459