Created attachment 171201 [details] [review] Bug 37845: Remove C4::Members::DeleteExpiredOpacRegistrations This patch remove the subroutine C4::Members::DeleteExpiredOpacRegistrations. The code is moved and adjusted to Koha::Patrons. We now have 2 new methods: Koha::Patrons->filter_by_expired_opac_registrations Koha::Patrons->filter_by_safe_to_delete Test plan: Run the misc/cronjobs/cleanup_database.pl script with the Improve the output of the verbose mode Tell if the something is wrong in the config (syspref not set)
Created attachment 171202 [details] [review] Bug 37845: Remove C4::Members::DeleteExpiredOpacRegistrations This patch remove the subroutine C4::Members::DeleteExpiredOpacRegistrations. The code is moved and adjusted to Koha::Patrons. We now have 2 new methods: Koha::Patrons->filter_by_expired_opac_registrations Koha::Patrons->filter_by_safe_to_delete Test plan: Run the misc/cronjobs/cleanup_database.pl script with the --del-exp-selfreg (as well as --verbose and --confirm) and confirm that it behaves as expected Note that it improve the output of the verbose mode and now tell if the something is wrong with the config (syspref not set)
(In reply to Jonathan Druart from comment #2) > Test plan: > Run the misc/cronjobs/cleanup_database.pl script with the > --del-exp-selfreg (as well as --verbose and --confirm) and confirm that > it behaves as expected I should have noted that there is a behaviour change here. Prior to this patch we only tested if the patron had checkouts and an account balance. Now we are relying on Koha::Patron->safe_to_delete that is doing much more tests (not anonymous patron, not protected, not a guarantor). That should not happen for self registration entries anyway, but this is a better test IMO.
Created attachment 171999 [details] [review] Bug 37845: Remove C4::Members::DeleteExpiredOpacRegistrations This patch remove the subroutine C4::Members::DeleteExpiredOpacRegistrations. The code is moved and adjusted to Koha::Patrons. We now have 2 new methods: Koha::Patrons->filter_by_expired_opac_registrations Koha::Patrons->filter_by_safe_to_delete Test plan: Run the misc/cronjobs/cleanup_database.pl script with the --del-exp-selfreg (as well as --verbose and --confirm) and confirm that it behaves as expected Note that it improve the output of the verbose mode and now tell if the something is wrong with the config (syspref not set) Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com>
Created attachment 172015 [details] [review] Bug 37845: Remove C4::Members::DeleteExpiredOpacRegistrations This patch remove the subroutine C4::Members::DeleteExpiredOpacRegistrations. The code is moved and adjusted to Koha::Patrons. We now have 2 new methods: Koha::Patrons->filter_by_expired_opac_registrations Koha::Patrons->filter_by_safe_to_delete Test plan: Run the misc/cronjobs/cleanup_database.pl script with the --del-exp-selfreg (as well as --verbose and --confirm) and confirm that it behaves as expected Note that it improve the output of the verbose mode and now tell if the something is wrong with the config (syspref not set) Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>