I use this script a lot during migrations to set the default preferences from the categories to all the patrons. However, recently I've had cases where about half the patrons did not have email addresses in their accounts. This means that I either set everyone's preferences and the library has to go back and remove the preferences from the patrons without email addresses, or I don't do it, and the library has to set the preferences for those with email addresses. (I think I've had back-to-back cases like this because in their old system it was set up as if the patron has an email address, they get the email notices, and if they want to opt-out, they remove their email address from their account.) It would be great if the script could skip the patrons without email addresses. (Note : we never set SMS messages by default, only email; I don't know if someone does this, but it is not a requirement for us to manage sms messaging with this script.)
Created attachment 183769 [details] [review] Bug 40076: Add --skip-no-email parameter to borrowers-force-messaging-defaults.pl This patch adds a new parameter to skip borrowers without an email address. To test: 1 - Create a new patron without an email address and note their borrowernumber. 2 - Run ./misc/maintenance/borrowers-force-messaging-defaults.pl ==> The patron created in step 1 should be processed. 3 - Repeat step 2 with the --skip-no-email parameter. ==> The patron created in step 1 should not be processed.