We would like to automate the delation of expired patrons to comply to french laws regarding privacy. But we don't want to delate an expired patron which is still using the OPAC for bibliographical purpose, like managing lists. We would like to be able to say when the patron logged himself for the last time to permit this. Whith this parameter we would like to be able to use it from misc/cronjobs/delete_patrons.pl and also with the "Clean Patron Records" intranet page.
Created attachment 50615 [details] [review] Bug 16276: Add a new pref TrackLastPatronActivity and new column borrowers.lastseen Sponsored-by: BULAC - http://www.bulac.fr/
Created attachment 50616 [details] [review] Bug 16276: Update borrowers.lastseen when a patron is active In order to add the ability to delete patrons who have been inactive for more than a given time, we need to track down the last time they were active. To do that, we need a new DB column in the borrowers table (lastseen). Note that the borrowers.lastseen column will not be initialised for existing installations (set to NULL) so inactive existing patrons will never be deleted. A workaround would be to init them at the date when the new column will be added. Test plan: 0/ Set the new pref TrackLastPatronActivity on 1/ Log in as a patron (staff or OPAC) 2/ Check that the borrowers.lastseen field has been updated with the current time Sponsored-by: BULAC - http://www.bulac.fr/
Created attachment 50617 [details] [review] Bug 16276: Make delete_patrons.pl deal with --last_seen This patch modify the delete_patrons.pl cronjob to deal with the last_seen option. To test it, you just have to use the --last_seen option and pass a valid date (iso format) Example: perl misc/cronjobs/delete_patrons.pl --last_seen="1984-02-04" --confirm will delete all the patrons who do not have been active since this date. Sponsored-by: BULAC - http://www.bulac.fr/
Created attachment 50618 [details] [review] Bug 16276: Change to GetBorrowersToExpunge to take last_seen into account Sponsored-by: BULAC - http://www.bulac.fr/
Created attachment 50619 [details] [review] Bug 16276: Make the batch patron deletion tool deal with last_seen This patch adds the same change as the previous one to the batch patron deletion tool. If the pref TrackLastPatronActivity is enabled, the librarians will be able to delete patrons who do not have been connected since a given time. Test plan: Define a date for the "who have not been connected since" options and confirm that it works as expected. Sponsored-by: BULAC - http://www.bulac.fr/
Created attachment 50620 [details] [review] Bug 16276: [DO_NOT_PUSH ] schema changes
Does not apply, there's a conflict on koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref. I'm not sure what's the righte move to do? Fix the conflict and if everything's OK sign?
Created attachment 51191 [details] [review] Bug 16276: Add a new pref TrackLastPatronActivity and new column borrowers.lastseen Sponsored-by: BULAC - http://www.bulac.fr/
(In reply to Nicolas Legrand from comment #7) > Does not apply, there's a conflict on > koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref. I'm > not sure what's the righte move to do? Fix the conflict and if everything's > OK sign? The right way is to change the status to 'does not apply' and let the developer rebase the patches. However, if the fix is easy, you can fix it and sign it off.
Created attachment 51407 [details] [review] Bug 16276: Update borrowers.lastseen when a patron is active In order to add the ability to delete patrons who have been inactive for more than a given time, we need to track down the last time they were active. To do that, we need a new DB column in the borrowers table (lastseen). Note that the borrowers.lastseen column will not be initialised for existing installations (set to NULL) so inactive existing patrons will never be deleted. A workaround would be to init them at the date when the new column will be added. Test plan: 0/ Set the new pref TrackLastPatronActivity on 1/ Log in as a patron (staff or OPAC) 2/ Check that the borrowers.lastseen field has been updated with the current time Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276
Created attachment 51408 [details] [review] Bug 16276: Make delete_patrons.pl deal with --last_seen This patch modify the delete_patrons.pl cronjob to deal with the last_seen option. To test it, you just have to use the --last_seen option and pass a valid date (iso format) Example: perl misc/cronjobs/delete_patrons.pl --last_seen="1984-02-04" --confirm will delete all the patrons who do not have been active since this date. Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276
Created attachment 51409 [details] [review] Bug 16276: Change to GetBorrowersToExpunge to take last_seen into account Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> With small change: number of tests in t/db_dependent/Members.t https://bugs.koha-community.org/show_bug.cgi?id=12276
Created attachment 51410 [details] [review] Bug 16276: Make the batch patron deletion tool deal with last_seen This patch adds the same change as the previous one to the batch patron deletion tool. If the pref TrackLastPatronActivity is enabled, the librarians will be able to delete patrons who do not have been connected since a given time. Test plan: Define a date for the "who have not been connected since" options and confirm that it works as expected. Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276
Created attachment 51411 [details] [review] Bug 16276: [DO_NOT_PUSH ] schema changes Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276
Created attachment 51412 [details] [review] Bug 16276: Add a new pref TrackLastPatronActivity and new column borrowers.lastseen Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276
Created attachment 54588 [details] [review] Bug 16276: Update borrowers.lastseen when a patron is active In order to add the ability to delete patrons who have been inactive for more than a given time, we need to track down the last time they were active. To do that, we need a new DB column in the borrowers table (lastseen). Note that the borrowers.lastseen column will not be initialised for existing installations (set to NULL) so inactive existing patrons will never be deleted. A workaround would be to init them at the date when the new column will be added. Test plan: 0/ Set the new pref TrackLastPatronActivity on 1/ Log in as a patron (staff or OPAC) 2/ Check that the borrowers.lastseen field has been updated with the current time Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276
Created attachment 54589 [details] [review] Bug 16276: Make delete_patrons.pl deal with --last_seen This patch modify the delete_patrons.pl cronjob to deal with the last_seen option. To test it, you just have to use the --last_seen option and pass a valid date (iso format) Example: perl misc/cronjobs/delete_patrons.pl --last_seen="1984-02-04" --confirm will delete all the patrons who do not have been active since this date. Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276
Created attachment 54590 [details] [review] Bug 16276: Change to GetBorrowersToExpunge to take last_seen into account Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> With small change: number of tests in t/db_dependent/Members.t https://bugs.koha-community.org/show_bug.cgi?id=12276
Created attachment 54591 [details] [review] Bug 16276: Make the batch patron deletion tool deal with last_seen This patch adds the same change as the previous one to the batch patron deletion tool. If the pref TrackLastPatronActivity is enabled, the librarians will be able to delete patrons who do not have been connected since a given time. Test plan: Define a date for the "who have not been connected since" options and confirm that it works as expected. Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276
Created attachment 54592 [details] [review] Bug 16276: Add a new pref TrackLastPatronActivity and new column borrowers.lastseen Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276
Last patch set does not include the DBIC schema changes.
Created attachment 54612 [details] [review] Bug 16276: Update borrowers.lastseen when a patron is active In order to add the ability to delete patrons who have been inactive for more than a given time, we need to track down the last time they were active. To do that, we need a new DB column in the borrowers table (lastseen). Note that the borrowers.lastseen column will not be initialised for existing installations (set to NULL) so inactive existing patrons will never be deleted. A workaround would be to init them at the date when the new column will be added. Test plan: 0/ Set the new pref TrackLastPatronActivity on 1/ Log in as a patron (staff or OPAC) 2/ Check that the borrowers.lastseen field has been updated with the current time Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276
Created attachment 54613 [details] [review] Bug 16276: Make delete_patrons.pl deal with --last_seen This patch modify the delete_patrons.pl cronjob to deal with the last_seen option. To test it, you just have to use the --last_seen option and pass a valid date (iso format) Example: perl misc/cronjobs/delete_patrons.pl --last_seen="1984-02-04" --confirm will delete all the patrons who do not have been active since this date. Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276
Created attachment 54614 [details] [review] Bug 16276: Change to GetBorrowersToExpunge to take last_seen into account Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> With small change: number of tests in t/db_dependent/Members.t https://bugs.koha-community.org/show_bug.cgi?id=12276
Created attachment 54615 [details] [review] Bug 16276: Make the batch patron deletion tool deal with last_seen This patch adds the same change as the previous one to the batch patron deletion tool. If the pref TrackLastPatronActivity is enabled, the librarians will be able to delete patrons who do not have been connected since a given time. Test plan: Define a date for the "who have not been connected since" options and confirm that it works as expected. Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276
Created attachment 54616 [details] [review] Bug 16276: Add a new pref TrackLastPatronActivity and new column borrowers.lastseen Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276
Created attachment 54617 [details] [review] Bug 16276: [QA Follow-up] Number of tests corrected Applies to t/db_dependent/Members.t
Created attachment 54618 [details] [review] Bug 16276: [QA Follow-up] Only track when pref is enabled Do not track when the pref has not been enabled. This patch moves the conditional update in Auth.pm to Koha::Patron. And adds a test for the new track_login method. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Oops forgot some signoff lines..Hang on
Created attachment 54619 [details] [review] Bug 16276: Update borrowers.lastseen when a patron is active In order to add the ability to delete patrons who have been inactive for more than a given time, we need to track down the last time they were active. To do that, we need a new DB column in the borrowers table (lastseen). Note that the borrowers.lastseen column will not be initialised for existing installations (set to NULL) so inactive existing patrons will never be deleted. A workaround would be to init them at the date when the new column will be added. Test plan: 0/ Set the new pref TrackLastPatronActivity on 1/ Log in as a patron (staff or OPAC) 2/ Check that the borrowers.lastseen field has been updated with the current time Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276 Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 54620 [details] [review] Bug 16276: Make delete_patrons.pl deal with --last_seen This patch modify the delete_patrons.pl cronjob to deal with the last_seen option. To test it, you just have to use the --last_seen option and pass a valid date (iso format) Example: perl misc/cronjobs/delete_patrons.pl --last_seen="1984-02-04" --confirm will delete all the patrons who do not have been active since this date. Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276 Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 54621 [details] [review] Bug 16276: Change to GetBorrowersToExpunge to take last_seen into account Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> With small change: number of tests in t/db_dependent/Members.t https://bugs.koha-community.org/show_bug.cgi?id=12276 Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 54622 [details] [review] Bug 16276: Make the batch patron deletion tool deal with last_seen This patch adds the same change as the previous one to the batch patron deletion tool. If the pref TrackLastPatronActivity is enabled, the librarians will be able to delete patrons who do not have been connected since a given time. Test plan: Define a date for the "who have not been connected since" options and confirm that it works as expected. Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276 Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 54623 [details] [review] Bug 16276: Add a new pref TrackLastPatronActivity and new column borrowers.lastseen Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276 Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 54624 [details] [review] Bug 16276: [QA Follow-up] Number of tests corrected Applies to t/db_dependent/Members.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 54625 [details] [review] Bug 16276: [QA Follow-up] Only track when pref is enabled Do not track when the pref has not been enabled. This patch moves the conditional update in Auth.pm to Koha::Patron. And adds a test for the new track_login method. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 55495 [details] [review] Bug 16276: Update borrowers.lastseen when a patron is active In order to add the ability to delete patrons who have been inactive for more than a given time, we need to track down the last time they were active. To do that, we need a new DB column in the borrowers table (lastseen). Note that the borrowers.lastseen column will not be initialised for existing installations (set to NULL) so inactive existing patrons will never be deleted. A workaround would be to init them at the date when the new column will be added. Test plan: 0/ Set the new pref TrackLastPatronActivity on 1/ Log in as a patron (staff or OPAC) 2/ Check that the borrowers.lastseen field has been updated with the current time Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276 Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 55496 [details] [review] Bug 16276: Make delete_patrons.pl deal with --last_seen This patch modify the delete_patrons.pl cronjob to deal with the last_seen option. To test it, you just have to use the --last_seen option and pass a valid date (iso format) Example: perl misc/cronjobs/delete_patrons.pl --last_seen="1984-02-04" --confirm will delete all the patrons who do not have been active since this date. Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276 Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 55497 [details] [review] Bug 16276: Change to GetBorrowersToExpunge to take last_seen into account Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> With small change: number of tests in t/db_dependent/Members.t https://bugs.koha-community.org/show_bug.cgi?id=12276 Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 55498 [details] [review] Bug 16276: Make the batch patron deletion tool deal with last_seen This patch adds the same change as the previous one to the batch patron deletion tool. If the pref TrackLastPatronActivity is enabled, the librarians will be able to delete patrons who do not have been connected since a given time. Test plan: Define a date for the "who have not been connected since" options and confirm that it works as expected. Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276 Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 55499 [details] [review] Bug 16276: Add a new pref TrackLastPatronActivity and new column borrowers.lastseen Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> https://bugs.koha-community.org/show_bug.cgi?id=12276 Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 55500 [details] [review] Bug 16276: [QA Follow-up] Number of tests corrected Applies to t/db_dependent/Members.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 55501 [details] [review] Bug 16276: [QA Follow-up] Only track when pref is enabled Do not track when the pref has not been enabled. This patch moves the conditional update in Auth.pm to Koha::Patron. And adds a test for the new track_login method. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 16.11, thanks Jonathan, Marcel!
(In reply to Kyle M Hall from comment #44) > Pushed to master for 16.11, thanks Jonathan, Marcel! enhancement, passing for 16.05
New bug 18625 to update the field if 'last seen' is from a sip patron info request (used to validate patron for access to resources)
*** Bug 15504 has been marked as a duplicate of this bug. ***
Followup pushed to fix the update feedback http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=55332977bf4d70de9d78c324ad88b302d2174c10
Followup pushed to 18.11.x series too..
skipping enhancement for 18.05.x