From ef6463ad1ba5469fa27470eafd55d2571bfd0ef2 Mon Sep 17 00:00:00 2001 From: Sudha Bisht Date: Fri, 7 Aug 2015 16:38:00 +0530 Subject: [PATCH] Fix for multiple role assignment between cases --- CRM/Contact/BAO/Relationship.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Contact/BAO/Relationship.php b/CRM/Contact/BAO/Relationship.php index c8f5362d5f..dd1f1305f2 100644 --- a/CRM/Contact/BAO/Relationship.php +++ b/CRM/Contact/BAO/Relationship.php @@ -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, -- 2.25.1