HOR-3388
This commit is contained in:
@@ -3347,7 +3347,7 @@ class Cases
|
|||||||
* @return integer
|
* @return integer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function getCurrentDelegation($sApplicationUID = '', $sUserUID = '')
|
public function getCurrentDelegation($sApplicationUID = '', $sUserUID = '', $onlyOpenThreads = false)
|
||||||
{
|
{
|
||||||
$oCriteria = new Criteria();
|
$oCriteria = new Criteria();
|
||||||
$oCriteria->add(AppDelegationPeer::APP_UID, $sApplicationUID);
|
$oCriteria->add(AppDelegationPeer::APP_UID, $sApplicationUID);
|
||||||
@@ -3362,7 +3362,9 @@ 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');
|
if ($onlyOpenThreads) {
|
||||||
|
$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)) {
|
||||||
|
|||||||
@@ -1013,7 +1013,7 @@ class Light
|
|||||||
{
|
{
|
||||||
$response = array("status" => "fail");
|
$response = array("status" => "fail");
|
||||||
$oCase = new \Cases();
|
$oCase = new \Cases();
|
||||||
$iDelIndex = $oCase->getCurrentDelegation( $sAppUid, '' );
|
$iDelIndex = $oCase->getCurrentDelegation( $sAppUid, '', true );
|
||||||
|
|
||||||
$oAppDelegation = new \AppDelegation();
|
$oAppDelegation = new \AppDelegation();
|
||||||
$aDelegation = $oAppDelegation->load( $sAppUid, $iDelIndex );
|
$aDelegation = $oAppDelegation->load( $sAppUid, $iDelIndex );
|
||||||
|
|||||||
Reference in New Issue
Block a user