Fix for multiple role assignment between cases
authorSudha Bisht <sudha.bisht@webaccessglobal.com>
Fri, 7 Aug 2015 11:08:00 +0000 (16:38 +0530)
committerSudha Bisht <sudha.bisht@webaccessglobal.com>
Fri, 7 Aug 2015 11:08:00 +0000 (16:38 +0530)
CRM/Contact/BAO/Relationship.php

index c8f5362d5f9deb9dcb28416a993c48065818f426..dd1f1305f2b1c765816b3aa92cb64657c6eb02e1 100644 (file)
@@ -189,6 +189,10 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship {
           continue;
         }
 
+        //CRM-16978:check duplicate relationship as per case id.
+        if ($caseId = CRM_Utils_Array::value('case_id', $params)) {
+          $contactFields['case_id'] = $caseId;
+        }
         if (
         self::checkDuplicateRelationship(
           $contactFields,