CRM-21384 - Don't show deleted contacts in case relations
authorColeman Watts <coleman@civicrm.org>
Wed, 1 Nov 2017 21:21:38 +0000 (17:21 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 7 Nov 2017 16:21:41 +0000 (11:21 -0500)
CRM/Case/BAO/Case.php

index 89c77bd94f6b7f76d263a9adf15178b1118718f0..fa70ea7b3808c9284de1451d4c180d8b69ea8ea9 100644 (file)
@@ -336,7 +336,7 @@ WHERE civicrm_case.id = %1";
  LEFT JOIN  civicrm_case_contact ON civicrm_case_contact.contact_id = contact_a.id
  LEFT JOIN  civicrm_email ce ON ( ce.contact_id = contact_a.id AND ce.is_primary = 1)
  LEFT JOIN  civicrm_phone cp ON ( cp.contact_id = contact_a.id AND cp.is_primary = 1)
-     WHERE  civicrm_case_contact.case_id = %1
+     WHERE  contact_a.is_deleted = 0 AND civicrm_case_contact.case_id = %1
      ORDER BY civicrm_case_contact.id";
 
     $dao = CRM_Core_DAO::executeQuery($query,