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

SMS activity bugfixes related to Mass SMS

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.3.0
    • Component/s: CiviSMS
    • Labels:
      None

      Description

      As http://issues.civicrm.org/jira/browse/CRM-12288 has been put back to 4.4 as it requires changed to activity types and country code etc, I'd like to suggest a couple of simple bugfixes for 4.3, as these do not effect upgrades etc:

      https://github.com/ThomWilhelm/civicrm-core/commit/9f1ee5f805f51e4e21177573f6ac2891ac457670

      This ensures SMS messages are only send to mobile numbers:

      CRM/Activity/BAO/Activity.php

      • $smsParams['To'] = $values['phone'];
        + // Only send if the phone is of type mobile
        + if($values['phone_type_id'] == 2) { + $smsParams['To'] = $values['phone']; + }

        else

        { + $smsParams['To'] = ''; + }

      This ensures that when you send a Mass SMS, if 1 SMS fails it will not remove the shared Outbound SMS activity:

      tools/extensions/org.civicrm.sms.clickatell/org_civicrm_sms_clickatell.php

      • // delete any parent activity & throw error
      • if (CRM_Utils_Array::value('parent_activity_id', $header)) { - $params = array('id' => $header['parent_activity_id']); - CRM_Activity_BAO_Activity::deleteActivity($params); - }
      • return PEAR::raiseError($response['data']);
        + // TODO: Should add a failed activity instead.
        +
        + CRM_Core_Error::debug_log_message($response['data']);
        + return;

        Attachments

          Activity

            People

            • Assignee:
              deepak Deepak Srivastava
              Reporter:
              thomwilhelm Thom Wilhelm
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: