Merged in bugfix/PMC-65 (pull request #6700)

PMC-65

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Paula Quispe
2018-11-29 15:15:43 +00:00
committed by Julio Cesar Laura Avendaño

View File

@@ -3545,10 +3545,12 @@ class Cases
if ($oPMScript->executedOn() === $oPMScript::AFTER_ROUTING) {
$appUid = !empty($fieldsCase['APPLICATION']) ? $fieldsCase['APPLICATION'] : '';
if (!empty($appUid)) {
$lastAppFields = $this->loadCase($appUid)['APP_DATA'];
$fieldsTrigger = array_merge($lastAppFields, $fieldsTrigger);
//Update $fieldsCase with the last appData
$fieldsCase = $this->loadCase($appUid)['APP_DATA'];
}
}
//Merge the current appData with variables changed
$fieldsCase = array_merge($fieldsCase, $fieldsTrigger);
//Register the time execution
$this->arrayTriggerExecutionTime[$trigger['TRI_UID']] = $oPMScript->scriptExecutionTime;
@@ -3567,17 +3569,10 @@ class Cases
);
}
/*----------------------------------********---------------------------------*/
//The Code Scanner can be interrupt the execution
if (empty($fieldsTrigger)) {
return $fieldsCase;
}
return $fieldsTrigger;
} else {
return $fieldsCase;
}
}
/**
* Find keys and values into the appData