Change Case Type Fix
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Fri, 12 Sep 2014 06:05:16 +0000 (11:35 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Fri, 12 Sep 2014 06:05:16 +0000 (11:35 +0530)
CRM/Case/Form/Activity.php
CRM/Case/Form/Activity/ChangeCaseType.php

index d73a75be5de265753ddd4359571b2bae5180a011..511b4880e325941414c966d8f88d31efa74f7784 100644 (file)
@@ -599,9 +599,6 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity {
       // update existing case record if needed
       $caseParams = $params;
       $caseParams['id'] = $vval['case_id'];
-      if (!empty($caseParams['case_type_id'])) {
-        $caseParams['case_type_id'] = CRM_Core_DAO::VALUE_SEPARATOR . $caseParams['case_type_id'] . CRM_Core_DAO::VALUE_SEPARATOR;
-      }
       if (!empty($caseParams['case_status_id'])) {
         $caseParams['status_id'] = $caseParams['case_status_id'];
       }
index 1feb2f00414cfa1a70234e1dcf63fa06698fcbdd..bef3ba76ad7f338655a45535136847c950aa0f95 100644 (file)
@@ -79,9 +79,10 @@ class CRM_Case_Form_Activity_ChangeCaseType {
     $form->removeElement('status_id');
     $form->removeElement('priority_id');
 
+    $caseId = CRM_Utils_Array::first($form->_caseId);
     $form->_caseType = CRM_Case_PseudoConstant::caseType();
     $form->_caseTypeId = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_Case',
-      $form->_caseId,
+      $caseId,
       'case_type_id'
     );
     if (!in_array($form->_caseTypeId, $form->_caseType)) {
@@ -185,13 +186,14 @@ class CRM_Case_Form_Activity_ChangeCaseType {
 
     // 1. initiate xml processor
     $xmlProcessor = new CRM_Case_XMLProcessor_Process();
+    $caseId = CRM_Utils_Array::first($form->_caseId);
     $xmlProcessorParams = array(
       'clientID' => $form->_currentlyViewedContactId,
       'creatorID' => $form->_currentUserId,
       'standardTimeline' => 1,
       'activityTypeName' => 'Change Case Type',
       'activity_date_time' => CRM_Utils_Array::value('reset_date_time', $params),
-      'caseID' => $form->_caseId,
+      'caseID' => $caseId,
       'resetTimeline' => CRM_Utils_Array::value('is_reset_timeline', $params),
     );