BUG 7717 7421 -> related to DEL_PREVIOUS from APP_DELEGATION table, FIXED!
- fixed -> blame to girish commit 2e97a8
This commit is contained in:
@@ -1393,10 +1393,10 @@ class Cases {
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function newAppDelegation($sProUid, $sAppUid, $sTasUid, $sUsrUid, $sPrevious, $iPriority, $sDelType, $iAppThreadIndex = 1) {
|
||||
function newAppDelegation($sProUid, $sAppUid, $sTasUid, $sUsrUid, $sPrevious, $iPriority, $sDelType, $iAppThreadIndex = 1, $nextDel=null) {
|
||||
try {
|
||||
$appDel = new AppDelegation();
|
||||
return $appDel->createAppDelegation($sProUid, $sAppUid, $sTasUid, $sUsrUid, $iAppThreadIndex, 3, false, $sPrevious );
|
||||
return $appDel->createAppDelegation($sProUid, $sAppUid, $sTasUid, $sUsrUid, $iAppThreadIndex, $iPriority, false, $sPrevious, $nextDel);
|
||||
}
|
||||
catch (exception $e) {
|
||||
throw ($e);
|
||||
|
||||
@@ -615,12 +615,17 @@ class Derivation
|
||||
//Incrementing the Del_thread First so that new delegation has new del_thread
|
||||
$iNewAppThreadIndex += 1;
|
||||
//Creating new delegation according to users in group
|
||||
$iMIDelIndex = $this->case->newAppDelegation( $appFields['PRO_UID'],$currentDelegation['APP_UID'],$nextDel['TAS_UID'],
|
||||
$iMIDelIndex = $this->case->newAppDelegation(
|
||||
$appFields['PRO_UID'],
|
||||
$currentDelegation['APP_UID'],
|
||||
$nextDel['TAS_UID'],
|
||||
(isset($aValue['USR_UID']) ? $aValue['USR_UID'] : ''),
|
||||
$currentDelegation['DEL_INDEX'],
|
||||
$nextDel,
|
||||
3, //$nextDel['DEL_PRIORITY'], <- //TODO check this priority alway is 3
|
||||
$delType,
|
||||
$iNewAppThreadIndex);
|
||||
$iNewAppThreadIndex,
|
||||
$nextDel
|
||||
);
|
||||
|
||||
$iNewThreadIndex = $this->case->newAppThread ( $currentDelegation['APP_UID'], $iMIDelIndex, $iAppThreadIndex );
|
||||
|
||||
@@ -634,12 +639,17 @@ class Derivation
|
||||
//No Break, need no execute the default ones....
|
||||
default:
|
||||
// Create new delegation
|
||||
$iNewDelIndex = $this->case->newAppDelegation( $appFields['PRO_UID'],$currentDelegation['APP_UID'],$nextDel['TAS_UID'],
|
||||
$iNewDelIndex = $this->case->newAppDelegation(
|
||||
$appFields['PRO_UID'],
|
||||
$currentDelegation['APP_UID'],
|
||||
$nextDel['TAS_UID'],
|
||||
(isset($nextDel['USR_UID']) ? $nextDel['USR_UID'] : ''),
|
||||
$currentDelegation['DEL_INDEX'],
|
||||
$nextDel,
|
||||
3, //$nextDel['DEL_PRIORITY'], <- //TODO check this priority alway is 3
|
||||
$delType,
|
||||
$iAppThreadIndex);
|
||||
$iAppThreadIndex,
|
||||
$nextDel
|
||||
);
|
||||
break;
|
||||
}
|
||||
$iAppThreadIndex = $appFields['DEL_THREAD'];
|
||||
|
||||
@@ -53,7 +53,8 @@ class AppDelegation extends BaseAppDelegation {
|
||||
* @param $isSubprocess is a subprocess inside a process?
|
||||
* @return delegation index of the application delegation.
|
||||
*/
|
||||
function createAppDelegation ($sProUid, $sAppUid, $sTasUid, $sUsrUid, $sAppThread, $sNextTasParam=null,$iPriority = 3, $isSubprocess=false ) {
|
||||
function createAppDelegation ($sProUid, $sAppUid, $sTasUid, $sUsrUid, $sAppThread, $iPriority = 3, $isSubprocess = false, $sPrevious = -1, $sNextTasParam = null) {
|
||||
//function createAppDelegation ($sProUid, $sAppUid, $sTasUid, $sUsrUid, $sAppThread, $sNextTasParam=null,$iPriority = 3, $isSubprocess=false ) {
|
||||
|
||||
if (!isset($sProUid) || strlen($sProUid) == 0 ) {
|
||||
throw ( new Exception ( 'Column "PRO_UID" cannot be null.' ) );
|
||||
@@ -91,7 +92,7 @@ class AppDelegation extends BaseAppDelegation {
|
||||
$this->setProUid ( $sProUid );
|
||||
$this->setTasUid ( $sTasUid );
|
||||
$this->setDelIndex ( $delIndex );
|
||||
$this->setDelPrevious ( 0 );
|
||||
$this->setDelPrevious ( $sPrevious == -1 ? 0 : $sPrevious );
|
||||
$this->setUsrUid ( $sUsrUid );
|
||||
$this->setDelType ( 'NORMAL' );
|
||||
$this->setDelPriority ( ($iPriority != '' ? $iPriority : '3') );
|
||||
|
||||
Reference in New Issue
Block a user