This commit is contained in:
Julio Cesar Laura Avendaño
2017-06-09 11:31:55 -04:00
parent 96048cd0c6
commit e6211f3fe7
2 changed files with 3 additions and 2 deletions

View File

@@ -3363,12 +3363,13 @@ class Cases
//if the user is not in the task, we need to return a valid del index, so we are returning the latest delindex //if the user is not in the task, we need to return a valid del index, so we are returning the latest delindex
$oCriteria = new Criteria(); $oCriteria = new Criteria();
$oCriteria->add(AppDelegationPeer::APP_UID, $sApplicationUID); $oCriteria->add(AppDelegationPeer::APP_UID, $sApplicationUID);
$oCriteria->add(AppDelegationPeer::DEL_THREAD_STATUS, 'OPEN');
$oCriteria->addDescendingOrderByColumn(AppDelegationPeer::DEL_DELEGATE_DATE); $oCriteria->addDescendingOrderByColumn(AppDelegationPeer::DEL_DELEGATE_DATE);
$oApplication = AppDelegationPeer::doSelectOne($oCriteria); $oApplication = AppDelegationPeer::doSelectOne($oCriteria);
if (!is_null($oApplication)) { if (!is_null($oApplication)) {
return $oApplication->getDelIndex(); return $oApplication->getDelIndex();
} }
throw ( new Exception('this case has 0 delegations') ); throw ( new Exception('This case has 0 current delegations') );
} }
/* /*

View File

@@ -1017,7 +1017,7 @@ class Light
{ {
$response = array("status" => "fail"); $response = array("status" => "fail");
$oCase = new \Cases(); $oCase = new \Cases();
$iDelIndex = $oCase->getCurrentDelegation( $sAppUid, $userUid ); $iDelIndex = $oCase->getCurrentDelegation( $sAppUid, '' );
$oAppDelegation = new \AppDelegation(); $oAppDelegation = new \AppDelegation();
$aDelegation = $oAppDelegation->load( $sAppUid, $iDelIndex ); $aDelegation = $oAppDelegation->load( $sAppUid, $iDelIndex );