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 * @return array
* *
* @see Cases::updateCase() * @see Cases::updateCase()
* @see Derivation::derivate()
*/ */
public function updateThreadTitle(string $appUid, int $appNumber, int $delIndex, $caseData = []) public function updateThreadTitle(string $appUid, int $appNumber, int $delIndex, $caseData = [])
{ {

View File

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