$res = CRM_Core_DAO::executeQuery($query);
while ($res->fetch()) {
+ if (!isset($rows[$res->case_type])) {
+ $rows[$res->case_type] = array_fill_keys($caseStatuses, []);
+ }
if (!empty($rows[$res->case_type]) && !empty($rows[$res->case_type][$res->case_status])) {
$rows[$res->case_type][$res->case_status]['count'] = $rows[$res->case_type][$res->case_status]['count'] + 1;
}
CRM_Utils_System::setTitle(ts('CiviCase Dashboard'));
- $userID = $session->get('userID');
-
//validate access for all cases.
if ($allCases && !CRM_Core_Permission::check('access all cases and activities')) {
$allCases = 0;
{foreach from=$casesSummary.headers item=header}
{assign var="caseStatus" value=$header.status}
<td class="label">
- {if isset($row.$caseStatus)}
+ {if is_array($row.$caseStatus)}
<a class="crm-case-summary-drilldown" href="{$row.$caseStatus.url}">{$row.$caseStatus.count}</a>
{else}
0
*/
public function testOpeningForms(string $url): void {
$this->createLoggedInUser();
-
+ \CRM_Core_BAO_ConfigSetting::enableComponent('CiviCase');
$_SERVER['REQUEST_URI'] = $url;
$urlParts = explode('?', $url);
$_GET['q'] = $urlParts[0];