fix code to work with api and UI, CRM-14474
authorkurund <kurund@civicrm.org>
Thu, 29 May 2014 20:33:48 +0000 (02:03 +0530)
committerkurund <kurund@civicrm.org>
Thu, 29 May 2014 20:33:48 +0000 (02:03 +0530)
----------------------------------------
* CRM-14474: Update CiviCase XML processor to load from DB *or* file
  https://issues.civicrm.org/jira/browse/CRM-14474

CRM/Case/XMLProcessor/Process.php

index 4c4548cffb081390e8b97297eebec6fc6c38ac50..1f57224fc4bc71d079cef871e26828e65719678e 100644 (file)
@@ -395,7 +395,7 @@ AND        a.is_deleted = 0
     $count = CRM_Core_DAO::singleValueQuery($query, $sqlParams);
 
     // check for max instance
-    $caseType = CRM_Case_BAO_Case::getCaseType($params['caseID'], 'title');
+    $caseType = CRM_Case_BAO_Case::getCaseType($params['caseID'], 'name');
     $maxInstance = self::getMaxInstance($caseType, $params['activityTypeName']);
 
     return $maxInstance ? ($count < $maxInstance ? FALSE : TRUE) : FALSE;