-
-
Notifications
You must be signed in to change notification settings - Fork 817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove some phone type restrictions around Send SMS #31180
base: master
Are you sure you want to change the base?
Conversation
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
cc folks who seem to use SMS: @michaelmcandrew @shaneonabike @jmcclelland @jaapjansma @kainuk (smsapi folks) |
7f0b898
to
026c614
Compare
@mlutfy there are 3 relevant test fails. Probably the tests just need to be updated to account for the less-restrictive rules. |
jenkins, test this please |
|
026c614
to
2d1f566
Compare
retest this please |
2d1f566
to
914afb7
Compare
I did a bit more cleanup, since that There is one thing that might be a deal breaker: in |
@@ -77,7 +77,6 @@ protected function getPhones(): array { | |||
->addWhere('contact_id.do_not_sms', '=', FALSE) | |||
->addWhere('contact_id.is_deceased', '=', FALSE) | |||
->addWhere('phone_numeric', '>', 0) | |||
->addWhere('phone_type_id:name', '=', 'Mobile') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm hesitant here. If the contact has a Non-Primary Mobile Number, it will not be used, the Primary will always be used.
Either the new getContactMobileOrPrimary
function needs to be rewritten with more complex SQL that says "pick mobile or primary or any number", which wouldn't be nice, or we loop through the contact IDs, assuming it is up to 50-100, and it's not a huge performance problem.
(I know this PR is getting weirder and weirder, but I think this is a pretty big issue with Send SMS usability)
914afb7
to
5799b68
Compare
Overview
The "Send SMS" feature requires that the contact have a phone of type "mobile". The year is 2024 and most people have phones that support SMS (my VoIP provider does anyway).
I sometimes encounter situations where people change those phone types, without knowing that there are hardcoded meanings around some of them. Or they are confused about why a phone would not receive SMS ☎️
Before
Admin can SMS only a contact with a phone of type "mobile".
After
Admin can SMS any number.
Comments
I tried keeping the feature that prioritizes a mobile number, if there is one. I only removed the restrictions on the "Send SMS" activity.
Mass-sms is maybe a bit more tricky, since if you know about the behaviour, maybe you expect it. I was thinking of maybe adding a help-text on that interface. I was curious how people felt about this change first.
This doc would need some tweaks: https://docs.civicrm.org/user/en/latest/sms-text-messaging/everyday-tasks/