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

Include gender 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

      This is similar to http://issues.civicrm.org/jira/browse/CRM-13223

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

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

      diff --git a/api/v3/Contact.php b/api/v3/Contact.php
      index b42f968..8330f31 100644
      — a/api/v3/Contact.php
      +++ b/api/v3/Contact.php
      @@ -226,6 +226,10 @@ 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['gender_id']['title'] = 'Gender ID';
      + $params['gender']['title'] = 'Gender';
      $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:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: