CRM-19890 - ensure we are only listing the active case manager
authorJamie McClelland <jm@mayfirst.org>
Tue, 17 Jan 2017 22:01:53 +0000 (17:01 -0500)
committerJamie McClelland <jm@mayfirst.org>
Tue, 17 Jan 2017 22:01:53 +0000 (17:01 -0500)
CRM/Case/BAO/Case.php

index 8791aa07d4139c89db5016c8781676b6d939df54..e6a0fa129c09eaada9c84bf0c232c12a7c87fc3f 100644 (file)
@@ -1856,7 +1856,7 @@ SELECT civicrm_contact.id as casemanager_id,
  FROM civicrm_contact
  LEFT JOIN civicrm_relationship ON (civicrm_relationship.contact_id_b = civicrm_contact.id AND civicrm_relationship.relationship_type_id = %1)
  LEFT JOIN civicrm_case ON civicrm_case.id = civicrm_relationship.case_id
- WHERE civicrm_case.id = %2";
+ WHERE civicrm_case.id = %2 AND is_active = 1";
 
       $managerRoleParams = array(
         1 => array($managerRoleId, 'Integer'),