From 85148081be76b6f0eae62f3484364f9aa149b08f Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 21 Oct 2019 17:54:44 -0400 Subject: [PATCH] Change caseType activityAsgmtGrps to store group name instead of id --- CRM/Case/BAO/CaseType.php | 6 ++++++ ang/crmCaseType/caseTypeDetails.html | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CRM/Case/BAO/CaseType.php b/CRM/Case/BAO/CaseType.php index e8466a7f59..415a079a14 100644 --- a/CRM/Case/BAO/CaseType.php +++ b/CRM/Case/BAO/CaseType.php @@ -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 diff --git a/ang/crmCaseType/caseTypeDetails.html b/ang/crmCaseType/caseTypeDetails.html index d11cc913c3..2bc30182ea 100644 --- a/ang/crmCaseType/caseTypeDetails.html +++ b/ang/crmCaseType/caseTypeDetails.html @@ -48,7 +48,7 @@ The original form used table layout; don't know if we have an alternative, CSS-b -- 2.25.1