This commit is contained in:
Paula Quispe
2019-04-30 10:39:54 -04:00
parent fac746e497
commit 91da0d6ea4
2 changed files with 15 additions and 15 deletions

View File

@@ -3541,19 +3541,19 @@ class Cases
*/
if ($oPMScript->executedOn() === $oPMScript::AFTER_ROUTING) {
//Get the variables changed with the trigger
$fieldsTrigger = arrayDiffRecursive($appDataAfterTrigger, $fieldsCase);
$fieldsTrigger = getDiffBetweenModifiedVariables($appDataAfterTrigger, $fieldsCase);
$collection = collect($fieldsCase);
$merged = $collection->merge($fieldsTrigger);
//Merge the appData with variables changed
$fieldsCase = $merged->all();
//We will be load the last appData because:
//Other thread execution can be changed the variables
$appUid = !empty($fieldsCase['APPLICATION']) ? $fieldsCase['APPLICATION'] : '';
//Save the fields changed in the trigger
if (!$varInAfterRouting && !empty($fieldsTrigger)) {
$varInAfterRouting = true;
}
//Merge the appData with variables changed
$fieldsCase = array_merge($fieldsCase, $fieldsTrigger);
} else {
$fieldsCase = $appDataAfterTrigger;
}