dev/core#530 CiviCase: fix Manage Case print report duplicate case roles rows
authorAlice Frumin <alice@aghstrategies.com>
Tue, 9 Apr 2019 19:34:54 +0000 (15:34 -0400)
committerAlice Frumin <alice@aghtrategies.com>
Mon, 10 Jun 2019 15:22:34 +0000 (11:22 -0400)
CRM/Case/XMLProcessor/Report.php

index 98534dc95ec8fe2e6aababc572f8c1334ab6def5..2915874f79e57ed5d0668c8569f25d17fb3b060e 100644 (file)
@@ -824,8 +824,8 @@ LIMIT  1
     $xmlProcessor = new CRM_Case_XMLProcessor_Process();
     $caseRoles = $xmlProcessor->get($caseType, 'CaseRoles');
     foreach ($caseRelationships as $key => & $value) {
-      if (!empty($caseRoles[$value['relation_type']])) {
-        unset($caseRoles[$value['relation_type']]);
+      if (!empty($caseRoles[$value['relation_type'] . '_' . $value['relationship_direction']])) {
+        unset($caseRoles[$value['relation_type'] . '_' . $value['relationship_direction']]);
       }
       if ($isRedact) {
         if (!array_key_exists($value['name'], $report->_redactionStringRules)) {