PM-4134: Agregar validación cuando se cambian los markers y se tienen casos unassigned
.
This commit is contained in:
@@ -1927,5 +1927,23 @@ class Task
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getValidateSelfService($data)
|
||||||
|
{
|
||||||
|
$data = array_change_key_case($data, CASE_LOWER);
|
||||||
|
$sTaskUID = $data['act_uid'];
|
||||||
|
$response = new stdclass();
|
||||||
|
$oCriteria = new Criteria();
|
||||||
|
$oCriteria->add(AppDelegationPeer::DEL_THREAD_STATUS, "OPEN");
|
||||||
|
$oCriteria->add(AppDelegationPeer::TAS_UID, $sTaskUID);
|
||||||
|
$oCriteria->add(AppDelegationPeer::USR_UID, "");
|
||||||
|
$oApplication = AppDelegationPeer::doSelectOne($oCriteria);
|
||||||
|
if(!empty($oApplication)) {
|
||||||
|
$response->result = false;
|
||||||
|
$response->message = G::LoadTranslation('ID_CURRENT_ASSING_TYPE_WITH_CASES');
|
||||||
|
}
|
||||||
|
$response->result = true;
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -202,6 +202,26 @@ class Activity extends Api
|
|||||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @url PUT /:prj_uid/activity/validate-active-cases
|
||||||
|
*
|
||||||
|
* @param string $prj_uid {@min 32}{@max 32}
|
||||||
|
*/
|
||||||
|
public function doGetActivityValidateSelfService($prj_uid, $request_data = array())
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$task = new \ProcessMaker\BusinessModel\Task();
|
||||||
|
$task->setFormatFieldNameInUppercase(false);
|
||||||
|
$task->setArrayParamException(array("taskUid" => "act_uid"));
|
||||||
|
|
||||||
|
$response = $task->getValidateSelfService($request_data);
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user