Remove / deprecate case code
authorEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 6 Jan 2022 21:42:37 +0000 (10:42 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sat, 8 Jan 2022 02:10:13 +0000 (15:10 +1300)
It's clear it can't be passed in from the separated off version & it also is not reached from
the importer - which leaves only external usages (not supported but deprecation will do for now)

CRM/Contact/BAO/Contact/Utils.php
CRM/Contact/BAO/Relationship.php

index e6fb6026b340967158d7df42313a44e5efec4918..f3679cab81f01d4fa2d3b63c6d39a37be8835408 100644 (file)
@@ -342,10 +342,6 @@ WHERE  id IN ( $idString )
         continue;
       }
 
-      //CRM-16978:check duplicate relationship as per case id.
-      if ($caseId = CRM_Utils_Array::value('case_id', $params)) {
-        $contactFields['case_id'] = $caseId;
-      }
       if (
         CRM_Contact_BAO_Relationship::checkDuplicateRelationship(
           $contactFields,
index 2d623c5daebed29bece66a9ea54b427d8c488daf..502f6b143ae14d44fc5ce2052fdc06b61e09e6f2 100644 (file)
@@ -193,7 +193,9 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship {
         }
 
         //CRM-16978:check duplicate relationship as per case id.
+        // https://issues.civicrm.org/jira/browse/CRM-16978
         if ($caseId = CRM_Utils_Array::value('case_id', $params)) {
+          CRM_Core_Error::deprecatedWarning('this code is believed to be unreachable');
           $contactFields['case_id'] = $caseId;
         }
         if (