Skip to content
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

core/384 CiviSMS does not fall back to non-primary mobile number #12890

Merged
merged 2 commits into from
Oct 10, 2018

Conversation

dereklewis123
Copy link
Contributor

@dereklewis123 dereklewis123 commented Oct 2, 2018

Overview

Fix CiviSMS to message non primary mobiles.

Before

SMS will not be sent to a contact if their mobile is not the primary phone

After

Non primary mobiles can receive CiviSMS

TESTS

Technical Details

This allows the non-primary mobile to get it & adds a test. However, it seems a fix on the order by is needed as well in order to prioritise them

Comments

@kenwest @dereklewis123 - I closed this #12765 but it seems it's probably still needed

@civibot
Copy link

civibot bot commented Oct 2, 2018

(Standard links)

@civibot civibot bot added the master label Oct 2, 2018
@dereklewis123
Copy link
Contributor Author

Test failed as expected. Adding a commit to fix it soon.

@dereklewis123
Copy link
Contributor Author

Further using testing required. Do not merge yet.

@eileenmcnaughton
Copy link
Contributor

@dereklewis123 @kenwest I think you have both been working on this - I think the one line change in this PR

#12765

may be part of the problem too

@dereklewis123 the 7 test fails above are unrelated -due to a current server issue
@kenwest perhaps you could review

@kenwest
Copy link
Contributor

kenwest commented Oct 10, 2018

Looks good to me

@eileenmcnaughton
Copy link
Contributor

Merging - change has been subject to a bit of discussion & seems agreed. Most of the patch is unit tests which we like

@eileenmcnaughton eileenmcnaughton merged commit 36e4d1a into civicrm:master Oct 10, 2018
);

// Prepare expected results
$checkPhoneIDs = array(
$contactID1 => $contactIDPhoneRecords[$contactID1]['primary_phone_id'],
$contactID2 => $contactIDPhoneRecords[$contactID2]['primary_phone_id'],
$contactID3 => $contactIDPhoneRecords[$contactID3]['other_phone_id'],
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton Oct 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JKingsnorth is this line wrong? ie if we fix order by it will be the primary phone id?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eileenmcnaughton - no this test is correct, we want to pick up the 'other' in this case, because the primary phone number is not of the type 'mobile'.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahhhh

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More like 'aaarrghh?!'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:-)

@JKingsnorth
Copy link
Contributor

As discussed in #12765 there are some issues with this PR/merge which will be tackled in a future PR. We will link to it when it is created.

@JKingsnorth
Copy link
Contributor

Issues resolved, this PR is fine just as it is, and has been merged. Rejoice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants