[Bug 28457] New: cleanup_database.pl should cleanup self-registration based on system preferences
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28457 Bug ID: 28457 Summary: cleanup_database.pl should cleanup self-registration based on system preferences Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org It doesn't make sense to rely on CLI options for cleanup_database.pl, especially not when it comes to self-registration options. Instead, cleanup_database.pl should consult system preferences. -- 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=28457 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24968 -- 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=28457 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | -- 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=28457 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|cleanup_database.pl should |cleanup_database.pl |cleanup self-registration |self-registration options |based on system preferences |are not configurable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28457 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- I notice that --del-unv-selfreg doesn't actually work correctly already either... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28457 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28457 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Created attachment 121401 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121401&action=edit Bug 28457: Add configuration to cleanup_database.pl for self-registration This patch fixes the --del-unv-selfreg option so that it can actually accept a DAYS parameter. (Note that backwards compatibility is preserved so that not specifying DAYS will still work.) This patch also uses the following self registration system preferences to trigger the cleanup: PatronSelfRegistrationExpireTemporaryAccountsDelay PatronSelfRegistrationVerifyByEmail Note that --del-unv-selfreg will override an instance's system preference. This means that on a package install the cleanup will just work. Test plan: 0. Apply patch 1. perl ./misc/cronjobs/cleanup_database.pl -v You did not specify any cleanup work for the script to do. 2. perl ./misc/cronjobs/cleanup_database.pl -v --del-exp-selfreg Confirm flag not passed, running in dry-run mode... Start lock unsubscribed, anonymize and delete 0 patrons would have been locked 0 patrons would have been anonymized 0 patrons would have been deleted self-registered borrowers may be deleted 3. perl ./misc/cronjobs/cleanup_database.pl -v --del-unv-selfreg Confirm flag not passed, running in dry-run mode... Start lock unsubscribed, anonymize and delete 0 patrons would have been locked 0 patrons would have been anonymized 0 patrons would have been deleted unverified self-registrations may be deleted after 1 days 4. perl ./misc/cronjobs/cleanup_database.pl -v --del-unv-selfreg 3 Confirm flag not passed, running in dry-run mode... Start lock unsubscribed, anonymize and delete 0 patrons would have been locked 0 patrons would have been anonymized 0 patrons would have been deleted unverified self-registrations may be deleted after 3 days 5. Set "PatronSelfRegistrationExpireTemporaryAccountsDelay" to 1 6. Set "PatronSelfRegistrationVerifyByEmail" to "Require" 7. perl ./misc/cronjobs/cleanup_database.pl -v Confirm flag not passed, running in dry-run mode... Start lock unsubscribed, anonymize and delete 0 patrons would have been locked 0 patrons would have been anonymized 0 patrons would have been deleted self-registered borrowers may be deleted unverified self-registrations may be deleted after 1 days 8. perl ./misc/cronjobs/cleanup_database.pl -v --del-unv-selfreg 2 Confirm flag not passed, running in dry-run mode... Start lock unsubscribed, anonymize and delete 0 patrons would have been locked 0 patrons would have been anonymized 0 patrons would have been deleted self-registered borrowers may be deleted unverified self-registrations may be deleted after 2 days -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28457 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=25429 --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- The option vs syspref question for this script has been discussed recently on bug 25429. The last version of the patches there *should* reflect the consensus we found (I haven't had the time to review however). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28457 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #3)
The option vs syspref question for this script has been discussed recently on bug 25429.
The last version of the patches there *should* reflect the consensus we found (I haven't had the time to review however).
Hmm that last patch doesn't make sense to me... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28457 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|dcook@prosentient.com.au |koha-bugs@lists.koha-commun | |ity.org -- 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=28457 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Please don't forget to set assignee, thx! -- 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=28457 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |lucas@bywatersolutions.com --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- Hey David, looks like this one needs a simple rebase. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28457 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28457 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121401|0 |1 is obsolete| | --- Comment #7 from David Cook <dcook@prosentient.com.au> --- Created attachment 158297 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158297&action=edit Bug 28457: Add configuration to cleanup_database.pl for self-registration This patch fixes the --del-unv-selfreg option so that it can actually accept a DAYS parameter. (Note that backwards compatibility is preserved so that not specifying DAYS will still work.) This patch also uses the following self registration system preferences to trigger the cleanup: PatronSelfRegistrationExpireTemporaryAccountsDelay PatronSelfRegistrationVerifyByEmail Note that --del-unv-selfreg will override an instance's system preference. This means that on a package install the cleanup will just work. Test plan: 0. Apply patch 1. perl ./misc/cronjobs/cleanup_database.pl -v You did not specify any cleanup work for the script to do. 2. perl ./misc/cronjobs/cleanup_database.pl -v --del-exp-selfreg Confirm flag not passed, running in dry-run mode... Start lock unsubscribed, anonymize and delete 0 patrons would have been locked 0 patrons would have been anonymized 0 patrons would have been deleted self-registered borrowers may be deleted 3. perl ./misc/cronjobs/cleanup_database.pl -v --del-unv-selfreg Confirm flag not passed, running in dry-run mode... Start lock unsubscribed, anonymize and delete 0 patrons would have been locked 0 patrons would have been anonymized 0 patrons would have been deleted unverified self-registrations may be deleted after 1 days 4. perl ./misc/cronjobs/cleanup_database.pl -v --del-unv-selfreg 3 Confirm flag not passed, running in dry-run mode... Start lock unsubscribed, anonymize and delete 0 patrons would have been locked 0 patrons would have been anonymized 0 patrons would have been deleted unverified self-registrations may be deleted after 3 days 5. Set "PatronSelfRegistrationExpireTemporaryAccountsDelay" to 1 6. Set "PatronSelfRegistrationVerifyByEmail" to "Require" 7. perl ./misc/cronjobs/cleanup_database.pl -v Confirm flag not passed, running in dry-run mode... Start lock unsubscribed, anonymize and delete 0 patrons would have been locked 0 patrons would have been anonymized 0 patrons would have been deleted self-registered borrowers may be deleted unverified self-registrations may be deleted after 1 days 8. perl ./misc/cronjobs/cleanup_database.pl -v --del-unv-selfreg 2 Confirm flag not passed, running in dry-run mode... Start lock unsubscribed, anonymize and delete 0 patrons would have been locked 0 patrons would have been anonymized 0 patrons would have been deleted self-registered borrowers may be deleted unverified self-registrations may be deleted after 2 days -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28457 --- Comment #8 from David Cook <dcook@prosentient.com.au> --- (In reply to Lucas Gass from comment #6)
Hey David, looks like this one needs a simple rebase.
Thanks, Lucas. I rebased but haven't re-tested myself. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28457 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matthias.le-gac@inlibro.com Status|Needs Signoff |Failed QA --- Comment #9 from Matthias Le Gac <matthias.le-gac@inlibro.com> --- In step 3 I don't have the message : Confirm flag not passed, running in dry-run mode... Start lock unsubscribed, anonymize and delete 0 patrons would have been locked 0 patrons would have been anonymized 0 patrons would have been deleted unverified self-registrations may be deleted after 1 days But I have : You did not specify any cleanup work for the script to do. The step 3 works only after I did the next steps -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28457 Cheryl <clackman@fargolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clackman@fargolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28457 Benjamin Daeuber <bdaeuber@cityoffargo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bdaeuber@cityoffargo.com --- Comment #10 from Benjamin Daeuber <bdaeuber@cityoffargo.com> --- Do we have a update on this? We can use batch patron deletion in the meantime, but that's another task to track. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28457 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|dcook@prosentient.com.au |koha-bugs@lists.koha-commun | |ity.org --- Comment #11 from David Cook <dcook@prosentient.com.au> --- (In reply to Benjamin Daeuber from comment #10)
Do we have a update on this? We can use batch patron deletion in the meantime, but that's another task to track.
Alas, it's not really on my list of priorities, so I think I'll reset the Assignee -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org