[Bug 40744] New: Don't give noisy warning when PatronSelfRegistration is turned off
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Bug ID: 40744 Summary: Don't give noisy warning when PatronSelfRegistration is turned off Change sponsored?: --- Product: Koha Version: 24.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz We have several instances on one server. Some are using patron self registration, others do not. Now when cleanup_database.pl is run, we get a warning in the logs: Self-registrations cannot be removed, system preference PatronSelfRegistrationDefaultCategory is not set This is unnecessary, as for the libraries in question PatronSelfRegistration is OFF and PatronSelfRegistrationExpireTemporaryAccountsDelay is set to 0. The pref description says: NOTE: This system preference requires the misc/cronjobs/cleanup_database.pl cronjob. Ask your system administrator to schedule it. No patrons will be deleted if you set the pref to zero or make it empty. So we are telling the script, it's OK, we don't want any deleted, and still get the noisy warning. This is unnecessary. The warning should only be given when PatronSelfRegistrationExpireTemporaryAccountsDelay is not empty or 0 and the PatronSelfRegistrationDefaultCategory is empty at the same time. We might also want to check for PatronSelfRegistration. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com --- Comment #1 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- We have the same since upgrading our clients from 24.05 to 25.05. Very annoying! We have the same cleanup cron for everyone on the server. We don't really want to start separating crons for the ones who have selfreg, vs those who don't. misc/cronjobs/cleanup_database.pl [...] --del-exp-selfreg --del-unv-selfreg 30 [...] -confirm This is an example of a client whose Self registration is not activated: MariaDB [***]> select variable, value from systempreferences where variable in ('PatronSelfRegistration', 'PatronSelfRegistrationDefaultCategory', 'PatronSelfRegistrationExpireTemporaryAccountsDelay'); +----------------------------------------------------+-------+ | variable | value | +----------------------------------------------------+-------+ | PatronSelfRegistration | 0 | | PatronSelfRegistrationDefaultCategory | | | PatronSelfRegistrationExpireTemporaryAccountsDelay | 0 | +----------------------------------------------------+-------+ 3 rows in set (0.000 sec) Message we get Self-registrations cannot be removed, system preference PatronSelfRegistrationDefaultCategory is not set -- 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=40744 --- Comment #2 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Probably due to the change in bug 37845 -- 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=40744 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |37845 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37845 [Bug 37845] Remove C4::Members::DeleteExpiredOpacRegistrations -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=40744 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 191869 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191869&action=edit Bug 40744: Ignore --del-exp-selfreg if pref is not set If PatronSelfRegistration we should ignore (i.e. do nothing) if --del-exp-selfreg is passed to cleanup_database.pl It prevents the script to warn that the pref is not set. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com Severity|enhancement |normal Assignee|koha-bugs@lists.koha-commun |jonathan.druart@gmail.com |ity.org | Version|24.11 |unspecified --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- Would this patch work for you? -- 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=40744 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thanks, I'll try to test as soon as I can! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191869|0 |1 is obsolete| | --- Comment #6 from Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> --- Created attachment 191874 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191874&action=edit Bug 40744: Ignore --del-exp-selfreg if pref is not set Skip self-registration cleanup when PatronSelfRegistrationExpireTemporaryAccountsDelay is 0 or unset as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 --- Comment #7 from Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> --- Created attachment 191875 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191875&action=edit BZ40744: Handle PatronSelfRegistration as well as PatronSelfRegistrationExpireTemporaryAccountsDelay -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ayoub.glizi-vicioso@inLibro | |.com Attachment #191875|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 --- Comment #8 from Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> --- Created attachment 191876 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191876&action=edit BZ40744: Handle PatronSelfRegistration as well as PatronSelfRegistrationExpireTemporaryAccountsDelay -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191876|0 |1 is obsolete| | --- Comment #9 from Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> --- Created attachment 191877 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191877&action=edit BZ40744: Handle PatronSelfRegistration as well as PatronSelfRegistrationExpireTemporaryAccountsDelay fix merge conflict. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 --- Comment #10 from Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> --- Comment on attachment 191877 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191877 BZ40744: Handle PatronSelfRegistration as well as PatronSelfRegistrationExpireTemporaryAccountsDelay Review of attachment 191877: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=40744&attachment=191877) ----------------------------------------------------------------- Handle error messages from the cleanup_database.pl script, depending on the preference settings. to test BEFORE APPLYING PATCH: 1- From the main page on the staff interface, go to Administration. 2- On the system preferences search bar, enter 'PatronSelfRegistration'. 3- Set 'PatronSelfRegistration' value to "Don't allow". 4- On the system preferences search bar, enter 'PatronSelfRegistrationExpireTemporaryAccountsDelay'. 5- Set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 6- On command line, run cleanup_database.pl. Note: the following message will show up: 'Self-registrations cannot be removed, system preference PatronSelfRegistrationDefaultCategory is not set' 7- Apply patch. AFTER APPLYING PATCH: 8- Set 'PatronSelfRegistration' value to "Don't allow" and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 9- Save and run cleanup_database.pl : No message should show up. 10- Set 'PatronSelfRegistration' value to "Allow" and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 11- Save and run cleanup_database.pl : No message should show up. 12- Set 'PatronSelfRegistration' value to "Don't allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '1'. 13- Save and run cleanup_database.pl : No message should show up. 14- Set 'PatronSelfRegistration' value to "Allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '1'. 15- Save and run cleanup_database.pl Note: this message should show up: 'Self-registrations cannot be removed, system preference PatronSelfRegistrationDefaultCategory is not set' 16- Set 'PatronSelfRegistration' value to "Don't allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to ''(leave empty). 17- Save and run cleanup_database.pl : No message should show up. 18- Set 'PatronSelfRegistration' value to "Allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to ''(leave empty). 19- Save and run cleanup_database.pl : No message should show up. ** EXEMPLE OF THE COMMAND TO EXECUTE: make sure to enter the RIGHT PATH to the script file. perl /path/to/cleanup_database.pl --sessions --sessdays 1 --zebraqueue 1 --mail 365 --merged --import 90 --z3950 --logs 180 --searchhistory 30 --list-invites 7 --all-restrictions --del-exp-selfreg --del-unv-selfreg 30 --temp-uploads --temp-uploads-days 14 --oauth-tokens --transfers 30 --jobs-days 1 --jobs-type all --confirm -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 --- Comment #11 from Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> --- Comment on attachment 191877 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191877 BZ40744: Handle PatronSelfRegistration as well as PatronSelfRegistrationExpireTemporaryAccountsDelay
From d48323236ef6071f263981944b33a039cf84bdae Mon Sep 17 00:00:00 2001 From: Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> Date: Thu, 22 Jan 2026 11:11:49 -0500 Subject: [PATCH] BZ40744: Handle PatronSelfRegistration as well as PatronSelfRegistrationExpireTemporaryAccountsDelay
Handle error messages from the cleanup_database.pl script, depending on the preference settings.
to test
BEFORE APPLYING PATCH:
1- From the main page on the staff interface, go to Administration. 2- On the system preferences search bar, enter 'PatronSelfRegistration'. 3- Set 'PatronSelfRegistration' value to "Don't allow". 4- On the system preferences search bar, enter 'PatronSelfRegistrationExpireTemporaryAccountsDelay'. 5- Set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 6- On command line, run cleanup_database.pl. Note: the following message will show up: 'Self-registrations cannot be removed, system preference PatronSelfRegistrationDefaultCategory is not set'
7- Apply patch.
AFTER APPLYING PATCH:
8- Set 'PatronSelfRegistration' value to "Don't allow" and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 9- Save and run cleanup_database.pl : No message should show up.
10- Set 'PatronSelfRegistration' value to "Allow" and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 11- Save and run cleanup_database.pl : No message should show up.
12- Set 'PatronSelfRegistration' value to "Don't allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '1'. 13- Save and run cleanup_database.pl : No message should show up.
14- Set 'PatronSelfRegistration' value to "Allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '1'. 15- Save and run cleanup_database.pl Note: this message should show up: 'Self-registrations cannot be removed, system preference PatronSelfRegistrationDefaultCategory is not set'
16- Set 'PatronSelfRegistration' value to "Don't allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to ''(leave empty). 17- Save and run cleanup_database.pl : No message should show up.
18- Set 'PatronSelfRegistration' value to "Allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to ''(leave empty). 19- Save and run cleanup_database.pl : No message should show up.
** EXEMPLE OF THE COMMAND TO EXECUTE: make sure to enter the RIGHT PATH to the script file.
perl /path/to/cleanup_database.pl --sessions --sessdays 1 --zebraqueue 1 --mail 365 --merged --import 90 --z3950 --logs 180 --searchhistory 30 --list-invites 7 --all-restrictions --del-exp-selfreg -->del-unv-selfreg 30 --temp-uploads --temp-uploads-days 14 --oauth-tokens --transfers 30 --jobs-days 1 --jobs-type all --confirm
--- misc/cronjobs/cleanup_database.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl index 2299e59cc5..14956ead72 100755 --- a/misc/cronjobs/cleanup_database.pl +++ b/misc/cronjobs/cleanup_database.pl @@ -524,7 +524,7 @@ if ($verbose) { say $confirm ? sprintf( "Deleted %d patrons", $count ) : sprintf( "%d patrons would have been deleted", $count ); }
-if ( $pExpSelfReg && C4::Context->preference('PatronSelfRegistration') ) { +if ( $pExpSelfReg && C4::Context->preference('PatronSelfRegistration') && C4::Context->preference('PatronSelfRegistrationExpireTemporaryAccountsDelay')) { try { my $opac_registrations = Koha::Patrons->search->filter_by_expired_opac_registrations->filter_by_safe_to_delete; my $count = $opac_registrations->count; -- 2.52.0
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191877|0 |1 is obsolete| | --- Comment #12 from Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> --- Created attachment 191886 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191886&action=edit Bug 40744: Ignore --del-exp-selfreg if pref is not set If PatronSelfRegistration we should ignore (i.e. do nothing) if --del-exp-selfreg is passed to cleanup_database.pl It prevents the script to warn that the pref is not set. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 --- Comment #13 from Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> --- Created attachment 191887 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191887&action=edit Bug 40744: Handle PatronSelfRegistration as well as PatronSelfRegistrationExpireTemporaryAccountsDelay -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191886|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191874|0 |1 is obsolete| | --- Comment #14 from Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> --- Created attachment 191888 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191888&action=edit Bug 40744: Ignore --del-exp-selfreg if pref is not set Handle error messages from the cleanup_database.pl script, depending on the preference settings. to test BEFORE APPLYING PATCH: 1- From the main page on the staff interface, go to Administration. 2- On the system preferences search bar, enter 'PatronSelfRegistration'. 3- Set 'PatronSelfRegistration' value to "Don't allow". 4- On the system preferences search bar, enter 'PatronSelfRegistrationExpireTemporaryAccountsDelay'. 5- Set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 6- On command line, run cleanup_database.pl. Note: the following message will show up: 'Self-registrations cannot be removed, system preference PatronSelfRegistrationDefaultCategory is not set' 7- Apply patch. AFTER APPLYING PATCH: 8- Set 'PatronSelfRegistration' value to "Don't allow" and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 9- Save and run cleanup_database.pl : No message should show up. 10- Set 'PatronSelfRegistration' value to "Allow" and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 11- Save and run cleanup_database.pl : No message should show up. 12- Set 'PatronSelfRegistration' value to "Don't allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '1'. 13- Save and run cleanup_database.pl : No message should show up. 14- Set 'PatronSelfRegistration' value to "Allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '1'. 15- Save and run cleanup_database.pl Note: this message should show up: 'Self-registrations cannot be removed, system preference PatronSelfRegistrationDefaultCategory is not set' 16- Set 'PatronSelfRegistration' value to "Don't allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to ''(leave empty). 17- Save and run cleanup_database.pl : No message should show up. 18- Set 'PatronSelfRegistration' value to "Allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to ''(leave empty). 19- Save and run cleanup_database.pl : No message should show up. ** EXEMPLE OF THE COMMAND TO EXECUTE: make sure to enter the RIGHT PATH to the script file. perl /path/to/cleanup_database.pl --sessions --sessdays 1 --zebraqueue 1 --mail 365 --merged --import 90 --z3950 --logs 180 --searchhistory 30 --list-invites 7 --all-restrictions --del-exp-selfreg --del-unv-selfreg 30 --temp-uploads --temp-uploads-days 14 --oauth-tokens --transfers 30 --jobs-days 1 --jobs-type all --confirm -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191887|0 |1 is obsolete| | --- Comment #15 from Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> --- Created attachment 191889 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191889&action=edit Bug 40744: Handle PatronSelfRegistration as well as PatronSelfRegistrationExpireTemporaryAccountsDelay -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Ayoub, I see that you wrote the test plan in Bugzilla or when using git bz, but that way it's only here and not part of the patch file. Better to do it in the git commit step, so it's part of the file. See here: https://wiki.koha-community.org/wiki/Commit_messages If I understand correctly your patch is a follow-up to Joubu's? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- But also: thanks for writing the test plan! (should have said that first!) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191888|0 |1 is obsolete| | --- Comment #18 from Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> --- Created attachment 191933 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191933&action=edit Bug 40744: Ignore --del-exp-selfreg if pref is not set If PatronSelfRegistration we should ignore (i.e. do nothing) if --del-exp-selfreg is passed to cleanup_database.pl It prevents the script to warn that the pref is not set. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191889|0 |1 is obsolete| | --- Comment #19 from Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> --- Created attachment 191934 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191934&action=edit Bug 40744: Handle PatronSelfRegistration as well as PatronSelfRegistrationExpireTemporaryAccountsDelay Test plan BEFORE APPLYING PATCH: 1- From the main page on the staff interface, go to Administration. 2- On the system preferences search bar, enter 'PatronSelfRegistration'. 3- Set 'PatronSelfRegistration' value to "Don't allow". 4- On the system preferences search bar, enter 'PatronSelfRegistrationExpireTemporaryAccountsDelay'. 5- Set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 6- On command line, run cleanup_database.pl. Note: the following message will show up: 'Self-registrations cannot be removed, system preference PatronSelfRegistrationDefaultCategory is not set' 7- Apply patch. AFTER APPLYING PATCH: 8- Set 'PatronSelfRegistration' value to "Don't allow" and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 9- Save and run cleanup_database.pl : No message should show up. 10- Set 'PatronSelfRegistration' value to "Allow" and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 11- Save and run cleanup_database.pl : No message should show up. 12- Set 'PatronSelfRegistration' value to "Don't allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '1'. 13- Save and run cleanup_database.pl : No message should show up. 14- Set 'PatronSelfRegistration' value to "Allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '1'. 15- Save and run cleanup_database.pl Note: this message should show up: 'Self-registrations cannot be removed, system preference PatronSelfRegistrationDefaultCategory is not set' 16- Set 'PatronSelfRegistration' value to "Don't allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to ''(leave empty). 17- Save and run cleanup_database.pl : No message should show up. 18- Set 'PatronSelfRegistration' value to "Allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to ''(leave empty). 19- Save and run cleanup_database.pl : No message should show up. ** EXEMPLE OF THE COMMAND TO EXECUTE: make sure to enter the RIGHT PATH to the script file. perl /path/to/cleanup_database.pl --sessions --sessdays 1 --zebraqueue 1 --mail 365 --merged --import 90 --z3950 --logs 180 --searchhistory 30 --list-invites 7 --all-restrictions --del-exp-selfreg --del-unv-selfreg 30 --temp-uploads --temp-uploads-days 14 --oauth-tokens --transfers 30 --jobs-days 1 --jobs-type all --confirm -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 --- Comment #20 from Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> --- (In reply to Katrin Fischer from comment #16)
Hi Ayoub, I see that you wrote the test plan in Bugzilla or when using git bz, but that way it's only here and not part of the patch file. Better to do it in the git commit step, so it's part of the file. See here: https://wiki.koha-community.org/wiki/Commit_messages
If I understand correctly your patch is a follow-up to Joubu's?
Hi Katrin,thanks for the note. I’ve adjusted the commit and added the test plan directly to the last commit message. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Assignee|jonathan.druart@gmail.com |ayoub.glizi-vicioso@inLibro | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|ayoub.glizi-vicioso@inLibro |jonathan.druart@gmail.com |.com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191933|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #191934|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 --- Comment #21 from David Nind <david@davidnind.com> --- Created attachment 192003 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192003&action=edit Bug 40744: Ignore --del-exp-selfreg if pref is not set If PatronSelfRegistration we should ignore (i.e. do nothing) if --del-exp-selfreg is passed to cleanup_database.pl It prevents the script to warn that the pref is not set. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 --- Comment #22 from David Nind <david@davidnind.com> --- Created attachment 192004 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192004&action=edit Bug 40744: Handle PatronSelfRegistration as well as PatronSelfRegistrationExpireTemporaryAccountsDelay Test plan BEFORE APPLYING PATCH: 1- From the main page on the staff interface, go to Administration. 2- On the system preferences search bar, enter 'PatronSelfRegistration'. 3- Set 'PatronSelfRegistration' value to "Don't allow". 4- On the system preferences search bar, enter 'PatronSelfRegistrationExpireTemporaryAccountsDelay'. 5- Set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 6- On command line, run cleanup_database.pl. Note: the following message will show up: 'Self-registrations cannot be removed, system preference PatronSelfRegistrationDefaultCategory is not set' 7- Apply patch. AFTER APPLYING PATCH: 8- Set 'PatronSelfRegistration' value to "Don't allow" and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 9- Save and run cleanup_database.pl : No message should show up. 10- Set 'PatronSelfRegistration' value to "Allow" and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 11- Save and run cleanup_database.pl : No message should show up. 12- Set 'PatronSelfRegistration' value to "Don't allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '1'. 13- Save and run cleanup_database.pl : No message should show up. 14- Set 'PatronSelfRegistration' value to "Allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '1'. 15- Save and run cleanup_database.pl Note: this message should show up: 'Self-registrations cannot be removed, system preference PatronSelfRegistrationDefaultCategory is not set' 16- Set 'PatronSelfRegistration' value to "Don't allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to ''(leave empty). 17- Save and run cleanup_database.pl : No message should show up. 18- Set 'PatronSelfRegistration' value to "Allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to ''(leave empty). 19- Save and run cleanup_database.pl : No message should show up. ** EXEMPLE OF THE COMMAND TO EXECUTE: make sure to enter the RIGHT PATH to the script file. perl /path/to/cleanup_database.pl --sessions --sessdays 1 --zebraqueue 1 --mail 365 --merged --import 90 --z3950 --logs 180 --searchhistory 30 --list-invites 7 --all-restrictions --del-exp-selfreg --del-unv-selfreg 30 --temp-uploads --temp-uploads-days 14 --oauth-tokens --transfers 30 --jobs-days 1 --jobs-type all --confirm Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 --- Comment #23 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. Note that the example cleanup_database.pl options to use are at the end of the test plan, from /kohadevbox/koha run: perl misc/cronjobs/cleanup_database.pl --sessions --sessdays 1 --zebraqueue 1 --mail 365 --merged --import 90 --z3950 --logs 180 --searchhistory 30 --list-invites 7 --all-restrictions --del-exp-selfreg --del-unv-selfreg 30 --temp-uploads --temp-uploads-days 14 --oauth-tokens --transfers 30 --jobs-days 1 --jobs-type all --confirm 2. Step 15: Had to clear the default value in PatronSelfRegistrationDefaultCategory (Self registration) for the message to show. Thanks for the test plan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192003|0 |1 is obsolete| | --- Comment #24 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 195255 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195255&action=edit Bug 40744: Ignore --del-exp-selfreg if pref is not set If PatronSelfRegistration we should ignore (i.e. do nothing) if --del-exp-selfreg is passed to cleanup_database.pl It prevents the script to warn that the pref is not set. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192004|0 |1 is obsolete| | --- Comment #25 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 195256 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195256&action=edit Bug 40744: Handle PatronSelfRegistration as well as PatronSelfRegistrationExpireTemporaryAccountsDelay Test plan BEFORE APPLYING PATCH: 1- From the main page on the staff interface, go to Administration. 2- On the system preferences search bar, enter 'PatronSelfRegistration'. 3- Set 'PatronSelfRegistration' value to "Don't allow". 4- On the system preferences search bar, enter 'PatronSelfRegistrationExpireTemporaryAccountsDelay'. 5- Set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 6- On command line, run cleanup_database.pl. Note: the following message will show up: 'Self-registrations cannot be removed, system preference PatronSelfRegistrationDefaultCategory is not set' 7- Apply patch. AFTER APPLYING PATCH: 8- Set 'PatronSelfRegistration' value to "Don't allow" and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 9- Save and run cleanup_database.pl : No message should show up. 10- Set 'PatronSelfRegistration' value to "Allow" and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. 11- Save and run cleanup_database.pl : No message should show up. 12- Set 'PatronSelfRegistration' value to "Don't allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '1'. 13- Save and run cleanup_database.pl : No message should show up. 14- Set 'PatronSelfRegistration' value to "Allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '1'. 15- Save and run cleanup_database.pl Note: this message should show up: 'Self-registrations cannot be removed, system preference PatronSelfRegistrationDefaultCategory is not set' 16- Set 'PatronSelfRegistration' value to "Don't allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to ''(leave empty). 17- Save and run cleanup_database.pl : No message should show up. 18- Set 'PatronSelfRegistration' value to "Allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to ''(leave empty). 19- Save and run cleanup_database.pl : No message should show up. ** EXEMPLE OF THE COMMAND TO EXECUTE: make sure to enter the RIGHT PATH to the script file. perl /path/to/cleanup_database.pl --sessions --sessdays 1 --zebraqueue 1 --mail 365 --merged --import 90 --z3950 --logs 180 --searchhistory 30 --list-invites 7 --all-restrictions --del-exp-selfreg --del-unv-selfreg 30 --temp-uploads --temp-uploads-days 14 --oauth-tokens --transfers 30 --jobs-days 1 --jobs-type all --confirm Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 --- Comment #26 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QA Comment: I wanted to keep the second patch of Ayoub here. But on second thought I feel it is wiser to remove it. If you have enabled SelfReg but delay is empty or zero, I think that it is better to warn than sliently skip. Note that the use cases from descripton and Comment1 are in line. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195256|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |When PatronSelfRegistration release notes| |is set to ignore (i.e. do | |nothing) if | |--del-exp-selfreg is passed | |to cleanup_database.pl we | |were issuing warnings. | |This patch removes those. CC| |martin.renvoize@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 --- Comment #27 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Thanks for all the hard work! Pushed to main for the next 26.05.00 release as RM Assistant -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 --- Comment #28 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This has been sitting for a little bit - can we please consider this for backporting? My coworkers would be quite happy as we see this a lot in our 24.11 installations. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_25_05_candidate, | |rel_25_11_candidate --- Comment #29 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Sadly, rel_24_11_candidate has been removed although it's still maintained. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.05 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 --- Comment #30 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #31 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Could I please get a test plan specifically for the patch Bug 40744: Ignore --del-exp-selfreg if pref is not set -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40744 --- Comment #32 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Wainui, giving the test plan a go: Configuration: - PatronSelfRegistrationDefaultCategory = no category set - PatronSelfRegistration = OFF - PatronSelfRegistrationExpireTemporaryAccountsDelay = 0 Run the cleanup_database script with the --del-exp-selfreg flag. Note the warning. Apply patch. Re-run: there should be no warning. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org