From a5a3c75266ed271aec97067361f1d170469607b1 Mon Sep 17 00:00:00 2001 From: Francis Whittle Date: Tue, 30 Oct 2018 12:19:16 +1100 Subject: [PATCH] Do not show "My Cases" where relationship is inactive in dashboard. --- CRM/Case/BAO/Case.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Case/BAO/Case.php b/CRM/Case/BAO/Case.php index 0e4260c3ef..f6f682f2d8 100644 --- a/CRM/Case/BAO/Case.php +++ b/CRM/Case/BAO/Case.php @@ -619,7 +619,7 @@ LEFT JOIN civicrm_option_group aog ON aog.name='activity_type' $whereClauses = array('civicrm_case.is_deleted = 0 AND civicrm_contact.is_deleted <> 1'); if (!$allCases) { - $whereClauses[] .= " case_relationship.contact_id_b = {$userID} "; + $whereClauses[] .= " case_relationship.contact_id_b = {$userID} AND case_relationship.is_active "; } if (empty($params['status_id']) && ($type == 'upcoming' || $type == 'any')) { $whereClauses[] = " civicrm_case.status_id != " . CRM_Core_PseudoConstant::getKey('CRM_Case_BAO_Case', 'case_status_id', 'Closed'); -- 2.25.1