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

Add test for new Contact,get group result format

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7
    • Fix Version/s: 4.7.13
    • Component/s: None
    • Labels:
    • Documentation Required?:
      Developer Doc
    • Funding Source:
      Contributed Code

      Description

      It seems that in 4.7 the result of

      civicrm_api3('Contact', 'get', ['id' => $id, 'return' => group]);

      has changed. It's an improvement IMO.

      I think this may have sneaked in unnoticed. I plan to add a test to lock down the new behaviour, since the 4.6 format was a bit ungainly (you can't tell if you're looking at two group titles, or a group title with a comma in it).

      Array
      (
          [is_error] => 0
          [version] => 3
          [count] => 1
          [id] => 3
          [values] => Array
              (
                  [3] => Array
                      (
                          [contact_id] => 3
                          [groups] => 1,2
                          [id] => 3
                      )
      
              )
      )

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              xurizaemon Chris Burgess
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: