Bug 41822

Summary: Add --skip-no-sms parameter to borrowers-force-messaging-defaults.pl
Product: Koha Reporter: Marion Durand <marion.durand>
Component: Command-line UtilitiesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: robin
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40076
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Marion Durand 2026-02-11 15:09:04 UTC
It would be great to have a special treatment for patrons without any SMS number to avoid setting SMS message preferences when the patron doesn't have a number.

Use case : 
Already in production, we what to use this script to update/unify messaging preferences.
Around half the patrons have an SMS number, all have an email address.
We want to be able to set SMS notification for those with an SMS number but not for those without any SMS number.

Currently, 
- if we check the SMS checkbox in the patron category then use the script, it will add SMS for every patron, which is not what we want.
- But if we uncheck the SMS checkbox in the patron category, it will be removed for patrons that have an SMS number, which is still not what we want.


It would be great to not set the SMS preference if the patron have no SMS number, but still set the email preference for this patron.
This behavior could be tied to a parameter given to the script.