Unverified Commit c658addc authored by colemanw's avatar colemanw Committed by GitHub

Merge pull request #11665 from JMAConsulting/CRM-21760-rc

CRM-21760: Manager Name is missing in 'Find Cases' search list
parents 8c06bc25 3479defe
......@@ -1889,7 +1889,7 @@ SELECT case_status.label AS case_status, status_id, civicrm_case_type.title AS c
return NULL;
}
$caseManagerContact = array();
$caseManagerName = '---';
$xmlProcessor = new CRM_Case_XMLProcessor_Process();
$managerRoleId = $xmlProcessor->getCaseManagerRoleId($caseType);
......@@ -1910,12 +1910,14 @@ SELECT civicrm_contact.id as casemanager_id,
$dao = CRM_Core_DAO::executeQuery($managerRoleQuery, $managerRoleParams);
if ($dao->fetch()) {
return sprintf('<a href="%s">%s</a>',
$caseManagerName = sprintf('<a href="%s">%s</a>',
CRM_Utils_System::url('civicrm/contact/view', array('cid' => $dao->casemanager_id)),
$dao->casemanager
);
}
}
return $caseManagerName;
}
/**
......
......@@ -349,12 +349,7 @@ class CRM_Case_Selector_Search extends CRM_Core_Selector_Base {
//adding case manager to case selector.CRM-4510.
$caseType = CRM_Case_BAO_Case::getCaseType($result->case_id, 'name');
$caseManagerContact = CRM_Case_BAO_Case::getCaseManagerContact($caseType, $result->case_id);
if (!empty($caseManagerContact)) {
$row['casemanager_id'] = CRM_Utils_Array::value('casemanager_id', $caseManagerContact);
$row['casemanager'] = CRM_Utils_Array::value('casemanager', $caseManagerContact);
}
$row['casemanager'] = CRM_Case_BAO_Case::getCaseManagerContact($caseType, $result->case_id);
if (isset($result->case_status_id) &&
array_key_exists($result->case_status_id, $caseStatus)
......
......@@ -66,7 +66,7 @@
<td class="{$row.class} crm-case-status_{$row.case_status}">{$row.case_status}</td>
<td class="crm-case-case_type">{$row.case_type}</td>
<td class="crm-case-case_role">{if $row.case_role}{$row.case_role}{else}---{/if}</td>
<td class="crm-case-case_manager">{if $row.casemanager_id}<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.casemanager_id`"}">{$row.casemanager}</a>{else}---{/if}</td>
<td class="crm-case-case_manager">{$row.casemanager}</td>
<td class="crm-case-case_recent_activity_type">{if $row.case_recent_activity_type}
{$row.case_recent_activity_type}<br />{$row.case_recent_activity_date|crmDate}{else}---{/if}</td>
<td class="crm-case-case_scheduled_activity_type">{if $row.case_scheduled_activity_type}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment