Bug 8926 - deletedborrowers should have a timestamp
Summary: deletedborrowers should have a timestamp
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Database (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Galen Charlton
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-16 14:49 UTC by Nicole C. Engard
Modified: 2017-06-14 22:11 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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