PMCORE-3317-2

This commit is contained in:
Paula Quispe
2021-09-28 14:29:18 -04:00
parent 0a8f28fe31
commit c6d02f1c21
2 changed files with 8 additions and 4 deletions

View File

@@ -649,6 +649,7 @@ class Cases
* @return array
*
* @see Cases::updateCase()
* @see Derivation::derivate()
*/
public function updateThreadTitle(string $appUid, int $appNumber, int $delIndex, $caseData = [])
{

View File

@@ -1086,11 +1086,14 @@ class Derivation
break;
default:
$iNewDelIndex = $this->doDerivation($currentDelegation, $nextDel, $appFields, $aSP);
$appUid = $currentDelegation['APP_UID'];
// Load Case Data again because the information could be change in method "doDerivation"
$verifyApplication = $this->case->loadCase($currentDelegation['APP_UID']);
$appFields['APP_DATA'] = $verifyApplication['APP_DATA'];
//When the users route the case in the same time
if($iNewDelIndex !== 0){
$lastData = $this->case->loadCase($appUid);
// Update the thread title related to the last index created
$this->case->updateThreadTitle($appUid, $lastData['APP_NUMBER'], $iNewDelIndex, $lastData['APP_DATA']);
$appFields['APP_DATA'] = $lastData['APP_DATA'];
// When the users route the case in the same time
if($iNewDelIndex !== 0) {
$arrayDerivationResult[] = [
'DEL_INDEX' => $iNewDelIndex,
'TAS_UID' => $nextDel['TAS_UID'],