From 219af4d3ded7ab873b50865c23ef5b4a2bb28ca8 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 29 Jul 2015 13:54:23 -0400 Subject: [PATCH] CRM-16930 - Use custom group label instead of generic 'Case Custom Data' --- CRM/Case/XMLProcessor/Report.php | 9 +++++---- templates/CRM/Case/Audit/Report.tpl | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/CRM/Case/XMLProcessor/Report.php b/CRM/Case/XMLProcessor/Report.php index d3396432d6..45356fde6d 100644 --- a/CRM/Case/XMLProcessor/Report.php +++ b/CRM/Case/XMLProcessor/Report.php @@ -979,10 +979,11 @@ LIMIT 1 $extends = array('case'); $groupTree = CRM_Core_BAO_CustomGroup::getGroupDetail(NULL, NULL, $extends); $caseCustomFields = array(); - while(list($id, $group_values) = each($groupTree)) { - while(list($id, $field_values) = each($group_values['fields'])) { - if(array_key_exists($id, $customValues)) { - $caseCustomFields[$id] = array( + while (list($gid, $group_values) = each($groupTree)) { + while (list($id, $field_values) = each($group_values['fields'])) { + if (array_key_exists($id, $customValues)) { + $caseCustomFields[$gid]['title'] = $group_values['title']; + $caseCustomFields[$gid]['values'][$id] = array( 'label' => $field_values['label'], 'value' => $customValues[$id], ); diff --git a/templates/CRM/Case/Audit/Report.tpl b/templates/CRM/Case/Audit/Report.tpl index 5dd29686c4..609a690bc4 100644 --- a/templates/CRM/Case/Audit/Report.tpl +++ b/templates/CRM/Case/Audit/Report.tpl @@ -127,15 +127,17 @@ {/if} {if $caseCustomFields} -

{ts}Case Custom Fields{/ts}

- - {foreach from=$caseCustomFields item=row} - - - - {/foreach} + {foreach from=$caseCustomFields item=group} +

{$group.title}

+
{$row.label} - {$row.value}
+ {foreach from=$group.values item=row} + + + + {/foreach}
{$row.label} + {$row.value}
+ {/foreach} {/if}

{ts}Case Activities{/ts}

-- 2.25.1