Bug 41822 - Add --skip-no-sms parameter to borrowers-force-messaging-defaults.pl
Summary: Add --skip-no-sms parameter to borrowers-force-messaging-defaults.pl
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-02-11 15:09 UTC by Marion Durand
Modified: 2026-02-11 15:14 UTC (History)
1 user (show)

See Also:
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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.