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