Correccion de errores en reasignacion
This commit is contained in:
@@ -1930,11 +1930,11 @@ class Cases
|
|||||||
$c->add(AppDelegationPeer::APP_UID, $sAppUid);
|
$c->add(AppDelegationPeer::APP_UID, $sAppUid);
|
||||||
$c->add(AppDelegationPeer::DEL_INDEX, $iDelIndex);
|
$c->add(AppDelegationPeer::DEL_INDEX, $iDelIndex);
|
||||||
$rowObj = AppDelegationPeer::doSelect($c);
|
$rowObj = AppDelegationPeer::doSelect($c);
|
||||||
G::LoadClass('dates');
|
$user = '';
|
||||||
$oDates = new dates();
|
|
||||||
foreach ($rowObj as $appDel) {
|
foreach ($rowObj as $appDel) {
|
||||||
$appDel->setDelThreadStatus('CLOSED');
|
$appDel->setDelThreadStatus('CLOSED');
|
||||||
$appDel->setDelFinishDate('now');
|
$appDel->setDelFinishDate('now');
|
||||||
|
$user = $appDel->getUsrUid();
|
||||||
if ($appDel->Validate()) {
|
if ($appDel->Validate()) {
|
||||||
$appDel->Save();
|
$appDel->Save();
|
||||||
} else {
|
} else {
|
||||||
@@ -1951,7 +1951,7 @@ class Cases
|
|||||||
$data['DEL_THREAD_STATUS'] = 'CLOSED';
|
$data['DEL_THREAD_STATUS'] = 'CLOSED';
|
||||||
$data['APP_UID'] = $sAppUid;
|
$data['APP_UID'] = $sAppUid;
|
||||||
$data['DEL_INDEX'] = $iDelIndex;
|
$data['DEL_INDEX'] = $iDelIndex;
|
||||||
$data['USR_UID'] = $appDel->getUsrUid();
|
$data['USR_UID'] = $user;
|
||||||
$listParticipatedLast = new ListParticipatedLast();
|
$listParticipatedLast = new ListParticipatedLast();
|
||||||
$listParticipatedLast->refresh($data);
|
$listParticipatedLast->refresh($data);
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
@@ -4281,6 +4281,27 @@ class Cases
|
|||||||
$this->appSolr->updateApplicationSearchIndex($sApplicationUID);
|
$this->appSolr->updateApplicationSearchIndex($sApplicationUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
$oCriteria = new Criteria('workflow');
|
||||||
|
$oCriteria->add(ListParticipatedLastPeer::APP_UID, $aData['APP_UID']);
|
||||||
|
$oCriteria->add(ListParticipatedLastPeer::USR_UID, $sUserUID);
|
||||||
|
$oCriteria->add(ListParticipatedLastPeer::DEL_INDEX, $iDelegation);
|
||||||
|
ListParticipatedLastPeer::doDelete($oCriteria);
|
||||||
|
$users = new Users();
|
||||||
|
$users->refreshTotal($sUserUID, 'remove', 'participated');
|
||||||
|
|
||||||
|
$aFieldsDel = array_merge($aData, $aFieldsDel);
|
||||||
|
$aFieldsDel['USR_UID'] = $newUserUID;
|
||||||
|
$inbox = new ListInbox();
|
||||||
|
$inbox->newRow($aFieldsDel, $sUserUID);
|
||||||
|
$users = new Users();
|
||||||
|
if ($aFields['APP_STATUS'] == 'DRAFT') {
|
||||||
|
$users->refreshTotal($sUserUID, 'remove', 'draft');
|
||||||
|
} else if ($iDelegation == 2) {
|
||||||
|
$users->refreshTotal($sUserUID, 'add', 'draft');
|
||||||
|
$users->refreshTotal($sUserUID, 'remove', 'inbox');
|
||||||
|
}
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
$this->getExecuteTriggerProcess($sApplicationUID, 'REASSIGNED');
|
$this->getExecuteTriggerProcess($sApplicationUID, 'REASSIGNED');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -6673,7 +6694,6 @@ class Cases
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once 'classes/model/Users.php';
|
|
||||||
$c = new Criteria('workflow');
|
$c = new Criteria('workflow');
|
||||||
$c->addSelectColumn(UsersPeer::USR_UID);
|
$c->addSelectColumn(UsersPeer::USR_UID);
|
||||||
$c->addSelectColumn(UsersPeer::USR_USERNAME);
|
$c->addSelectColumn(UsersPeer::USR_USERNAME);
|
||||||
|
|||||||
@@ -216,6 +216,7 @@ if ($actionAjax == "getUsersToReassign") {
|
|||||||
G::LoadClass( 'tasks' );
|
G::LoadClass( 'tasks' );
|
||||||
$task = new Task();
|
$task = new Task();
|
||||||
$tasks = $task->load($_SESSION['TASK']);
|
$tasks = $task->load($_SESSION['TASK']);
|
||||||
|
$result = new stdclass();
|
||||||
$result->data = $case->getUsersToReassign( $_SESSION['TASK'], $_SESSION['USER_LOGGED'], $tasks['PRO_UID'] );
|
$result->data = $case->getUsersToReassign( $_SESSION['TASK'], $_SESSION['USER_LOGGED'], $tasks['PRO_UID'] );
|
||||||
print G::json_encode( $result );
|
print G::json_encode( $result );
|
||||||
}
|
}
|
||||||
@@ -240,6 +241,7 @@ if ($actionAjax == 'reassignCase') {
|
|||||||
//print_r($caseData);
|
//print_r($caseData);
|
||||||
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
|
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
|
||||||
$data['USER'] = $userData['USR_LASTNAME'] . ' ' . $userData['USR_FIRSTNAME']; //TODO change with the farmated username from environment conf
|
$data['USER'] = $userData['USR_LASTNAME'] . ' ' . $userData['USR_FIRSTNAME']; //TODO change with the farmated username from environment conf
|
||||||
|
$result = new stdclass();
|
||||||
$result->status = 0;
|
$result->status = 0;
|
||||||
$result->msg = G::LoadTranslation( 'ID_REASSIGNMENT_SUCCESS', SYS_LANG, $data );
|
$result->msg = G::LoadTranslation( 'ID_REASSIGNMENT_SUCCESS', SYS_LANG, $data );
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user