HOR-1237 endpoint light/start-case returns a warning when no cases to start
This commit is contained in:
@@ -7,6 +7,7 @@ use Criteria;
|
||||
use UsersPeer;
|
||||
use AppDelegationPeer;
|
||||
use AppDelayPeer;
|
||||
use ProcessMaker\Util\DateTime;
|
||||
|
||||
class Light
|
||||
{
|
||||
@@ -89,7 +90,7 @@ class Light
|
||||
$dynaForm = \DynaformPeer::retrieveByPK($form['step_uid_obj']);
|
||||
|
||||
$newForm[$c]['formId'] = $form['step_uid_obj'];
|
||||
$newForm[$c]['formUpdateDate'] = $dynaForm->getDynUpdateDate();
|
||||
$newForm[$c]['formUpdateDate'] = DateTime::convertUtcToIso8601($dynaForm->getDynUpdateDate());
|
||||
$newForm[$c]['index'] = $c+1;
|
||||
$newForm[$c]['title'] = $form['obj_title'];
|
||||
$newForm[$c]['description'] = $form['obj_description'];
|
||||
|
||||
@@ -109,24 +109,7 @@ class Light extends Api
|
||||
{
|
||||
try {
|
||||
$oMobile = new \ProcessMaker\BusinessModel\Light();
|
||||
|
||||
$processListStartCase = $oMobile->getProcessListStartCase($this->getUserId());
|
||||
$processListStartCaseFrm = $processListStartCase[0]['forms'];
|
||||
|
||||
foreach ($processListStartCaseFrm as $key => $value) {
|
||||
$valueAux = $value;
|
||||
|
||||
if (array_key_exists('formUpdateDate', $valueAux)) {
|
||||
$valueAux['formUpdateDate'] = \ProcessMaker\Util\DateTime::convertUtcToIso8601($valueAux['formUpdateDate']);
|
||||
}
|
||||
|
||||
$value = array_replace($value, $valueAux);
|
||||
|
||||
$processListStartCaseFrm[$key] = $value;
|
||||
}
|
||||
|
||||
$processListStartCase[0]['forms'] = $processListStartCaseFrm;
|
||||
|
||||
$startCase = $processListStartCase;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
|
||||
Reference in New Issue
Block a user