HOR-3388
This commit is contained in:
@@ -3348,7 +3348,7 @@ class Cases
|
||||
* @return integer
|
||||
*/
|
||||
|
||||
public function getCurrentDelegation($sApplicationUID = '', $sUserUID = '')
|
||||
public function getCurrentDelegation($sApplicationUID = '', $sUserUID = '', $onlyOpenThreads = false)
|
||||
{
|
||||
$oCriteria = new Criteria();
|
||||
$oCriteria->add(AppDelegationPeer::APP_UID, $sApplicationUID);
|
||||
@@ -3363,7 +3363,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
|
||||
$oCriteria = new Criteria();
|
||||
$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);
|
||||
$oApplication = AppDelegationPeer::doSelectOne($oCriteria);
|
||||
if (!is_null($oApplication)) {
|
||||
|
||||
Reference in New Issue
Block a user