Bug 40744 - Don't give noisy warning when PatronSelfRegistration is turned off
Summary: Don't give noisy warning when PatronSelfRegistration is turned off
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: 24.11
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-03 07:22 UTC by Katrin Fischer
Modified: 2025-09-03 07:22 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2025-09-03 07:22:13 UTC
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.