Skip to content
Snippets Groups Projects
Commit 85148081 authored by colemanw's avatar colemanw
Browse files

Change caseType activityAsgmtGrps to store group name instead of id

parent 9c7ffe36
Branches
Tags
No related merge requests found
......@@ -234,6 +234,12 @@ class CRM_Case_BAO_CaseType extends CRM_Case_DAO_CaseType {
if (isset($xml->ActivityAsgmtGrps)) {
$definition['activityAsgmtGrps'] = (array) $xml->ActivityAsgmtGrps->Group;
// Backwards compat - convert group ids to group names if ids are supplied
if (array_filter($definition['activityAsgmtGrps'], ['\CRM_Utils_Rule', 'integer']) === $definition['activityAsgmtGrps']) {
foreach ($definition['activityAsgmtGrps'] as $idx => $group) {
$definition['activityAsgmtGrps'][$idx] = CRM_Core_DAO::getFieldValue('CRM_Contact_BAO_Group', $group);
}
}
}
// set activity types
......
......@@ -48,7 +48,7 @@ The original form used table layout; don't know if we have an alternative, CSS-b
<input
name="activityAsgmtGrps"
crm-ui-id="caseTypeDetailForm.activityAsgmtGrps"
crm-entityref="{entity: 'Group', api: {params: {is_hidden: 0, is_active: 1}}, select: {allowClear: true, multiple: true, placeholder: ts('Select Group')}}"
crm-entityref="{entity: 'Group', api: {id_field: 'name', params: {is_hidden: 0, is_active: 1}}, select: {allowClear: true, multiple: true, placeholder: ts('Select Group')}}"
ng-model="caseType.definition.activityAsgmtGrps"
/>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment