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

          [CRM-3644] group_type separator not set by API
          Kiran Jagtap added a comment -

          Tested and Confirmed at r18162
          Also update api v2 document is available here http://wiki.civicrm.org/confluence/display/CRMDOC/Group+APIs

          Kiran Jagtap added a comment -

          oops forgot to check 2.1 verified.

          Kurund Jalmi added a comment -
          • verified in rev 18901.

            People

            • Assignee:
              Kurund Jalmi
              Reporter:
              Matt Chapman

              Dates

              • Created:
                Updated:
                Resolved: