PM-4412: The row '' in table TASK doesn't exist! - Valeogit ss - Modificar endpoint PUT /:prj_uid/activity/validate-active-cases
cambio de consulta en criteria
This commit is contained in:
@@ -1939,11 +1939,26 @@ class Task
|
||||
}
|
||||
|
||||
public function getValidateSelfService($data)
|
||||
{
|
||||
{
|
||||
$paused = false;
|
||||
$data = array_change_key_case($data, CASE_LOWER);
|
||||
$sTaskUID = $data['act_uid'];
|
||||
$caseType = isset($data['case_type']) ? ($data['case_type'] == 'assigned' ? $data['case_type'] : 'unassigned') : 'unassigned';
|
||||
$response = new \stdclass();
|
||||
$response = new \stdclass();
|
||||
|
||||
$oCriteria = new \Criteria();
|
||||
$arrayCondition = array();
|
||||
$arrayCondition[] = array(\AppDelegationPeer::APP_UID, \AppDelayPeer::APP_UID);
|
||||
$arrayCondition[] = array(\AppDelegationPeer::DEL_INDEX, \AppDelayPeer::APP_DEL_INDEX);
|
||||
$oCriteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
|
||||
$oCriteria->add(\AppDelegationPeer::TAS_UID, $sTaskUID);
|
||||
$oCriteria->add(\AppDelayPeer::APP_DISABLE_ACTION_USER, "0");
|
||||
$oResult = \AppDelegationPeer::doSelectOne($oCriteria);
|
||||
if(!empty($oResult)) {
|
||||
$paused = true;
|
||||
}
|
||||
|
||||
$response->paused = $paused;
|
||||
$oCriteria = new \Criteria();
|
||||
$oCriteria->add(\AppDelegationPeer::DEL_THREAD_STATUS, "OPEN");
|
||||
$oCriteria->add(\AppDelegationPeer::TAS_UID, $sTaskUID);
|
||||
@@ -1952,11 +1967,10 @@ class Task
|
||||
}
|
||||
$oApplication = \AppDelegationPeer::doSelectOne($oCriteria);
|
||||
$response->result = true;
|
||||
if(!empty($oApplication)) {
|
||||
if(!empty($oApplication) || $paused) {
|
||||
$response->result = false;
|
||||
$response->message = G::LoadTranslation('ID_CURRENT_ASSING_TYPE_WITH_CASES');
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user