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

Can't update relationship by name using API after changing name in the web interface

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.2.3
    • Fix Version/s: 3.3.alpha
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      If a relationship name is changed in the web interface, using 'relationship_type' in civicrm_relationship_create() no longer works. The error is 'Invalid Relationship Type' even though it does exist.

      Change the relationship 'Child of/Parent of' to 'Kid of/Guardian of'. Assuming child is id 1 and parent is id 2, call the API:
      $params = array('contact_id_a' => 1, 'contact_id_b' => 2, 'relationship_type' => 'Kid of', 'is_active' => 1);
      $result =& civicrm_relationship_create($params);
      print_r($result);

      Will return:
      Array
      (
      [is_error] => 1
      [error_message] => Invalid Relationship Type
      )

        Attachments

          Activity

            People

            • Assignee:
              kurund Kurund Jalmi
              Reporter:
              dharmatech Dharmatech
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: