Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-21320

Mass SMS can select non-preferred mobile number

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.25
    • Fix Version/s: 4.7.31
    • Component/s: CiviMail
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      Where a contact has multiple mobile phone numbers, CiviCRM can choose the 'wrong' one to send a mass SMS to.

      This is because \CRM_Mailing_BAO_Mailing::getRecipients does not have an 'order by' clause when selecting which phone number to use.

      I think the fix is just to add ORDER BY is_primary DESC.

      But the email selection query also has a 'group by' which is missing from the SMS one, so I would like to check the effect this has and I'll put together a PR.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              john John K.
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: