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

Include phone entity fields in Contact get spec

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.5
    • Fix Version/s: 4.4.0
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      Previously, if one issued the following request, the phone-related fields would not be included:
      /p2c_drupal7/drupal/civicrm/ajax/rest?entity=Contact&action=get&id=3&return=phone

      Now, with the patch found below, the above query returns the phone fields.

      diff --git a/api/v3/Contact.php b/api/v3/Contact.php
      index b42f968..2dfe4b8 100644
      — a/api/v3/Contact.php
      +++ b/api/v3/Contact.php
      @@ -226,6 +226,8 @@ function _civicrm_api3_contact_get_spec(&$params) {
      $params['email_id']['title'] = 'Primary Email ID';
      $params['email']['title'] = 'Primary Email';
      $params['on_hold']['title'] = 'Primary Email On Hold';
      + $params['phone_id']['title'] = 'Primary Phone ID';
      + $params['phone']['title'] = 'Primary Phone';
      $params['im']['title'] = 'Primary Instant Messanger';
      $params['im_id']['title'] = 'Primary Instant Messanger ID';
      $params['group_id']['title'] = 'Group Memberships (filter)';

        Attachments

          Activity

            People

            • Assignee:
              kurund Kurund Jalmi
              Reporter:
              mmikitka Matt
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: