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

group_type separator not set by API

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.0, 2.1
    • Fix Version/s: 2.1
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      The following code from CRM_Group_Form_Edit::postProcess should probably belong in CRM_Contact_BAO_Group::create instead, so that the API also behaves properly:

      if ( is_array( $params['group_type'] ) )

      { $params['group_type'] = CRM_Core_DAO::VALUE_SEPARATOR . implode( CRM_Core_DAO::VALUE_SEPARATOR, array_keys( $params['group_type'] ) ) . CRM_Core_DAO::VALUE_SEPARATOR; }

      else

      { $params['group_type'] = ''; }

      Then, the API documentation needs to instruct developers to send group_type as an array; or even better, add code above to also parse a comma separated string.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: