Where (which JIRA issue, if any) did this change in API behaviour come from, and was it documented/expected?
Contact,get API call returns different results between 4.6 and 4.7.
IMO the new style is better, but I'm not sure the change was intended/documented. (I want clarification so I can expect the new behaviour to stick!)
API call for
return=group shows groups in the results.
civicrm_api3('Contact', 'get', array( 'sequential' => 1, 'return' => "group", 'id' => 3, ));
In 4.6 the result has groups shown by their group "title" (not name). Since group titles may contain a comma, there is some lack of certainty in the results (leading to workarounds like this).
[ 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 3, 'values' => [ [ 'contact_id' => '3', 'groups' => 'Example group,Example smart group', 'id' => '3', ] ] ]
In 4.7 the result has groups shown by their group ID, which is a bit more predictable to work with.
[ 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 3, 'values' => [ [ 'contact_id' => '3', 'groups' => '4,7', 'id' => '3', ] ] ]
I've checked the CiviCRM API Changelog and enquired on chat.civicrm.org without any luck so far. Help me, SE!