BUG 9014 Variable SYS_CASE_PRIORITY no funciona apropiadamente SOLVED
- La variable SYS_CASE_PRIORITY se estaba hardcoded en prioridad 3 - Normal. - Se pusieron validaciones para que se pudiera utilizar la prioridad de acuerdo con la variable. - La variable SYS_CASE_PRIORITY ahora se setea manualmente ya no se crea de manera automatica.
This commit is contained in:
@@ -887,7 +887,7 @@ class Cases {
|
|||||||
|
|
||||||
//now update the priority in appdelegation table, using the defined variable in task
|
//now update the priority in appdelegation table, using the defined variable in task
|
||||||
if (trim($DEL_INDEX) != '' && trim($TAS_UID) != '') {
|
if (trim($DEL_INDEX) != '' && trim($TAS_UID) != '') {
|
||||||
//optimized code to avoid load task content row.
|
//optimized code to avoid load task content row.
|
||||||
$c = new Criteria();
|
$c = new Criteria();
|
||||||
$c->clearSelectColumns();
|
$c->clearSelectColumns();
|
||||||
$c->addSelectColumn(TaskPeer::TAS_PRIORITY_VARIABLE);
|
$c->addSelectColumn(TaskPeer::TAS_PRIORITY_VARIABLE);
|
||||||
@@ -906,12 +906,16 @@ class Cases {
|
|||||||
$x = unserialize($Fields['APP_DATA']);
|
$x = unserialize($Fields['APP_DATA']);
|
||||||
if (isset($x[$VAR_PRI])) {
|
if (isset($x[$VAR_PRI])) {
|
||||||
if (trim($x[$VAR_PRI]) != '') {
|
if (trim($x[$VAR_PRI]) != '') {
|
||||||
|
$priority = 3;
|
||||||
|
if (is_numeric($x[$VAR_PRI])) {
|
||||||
|
$priority = ($x[$VAR_PRI] >= 1 && $x[$VAR_PRI] <= 5) ? $x[$VAR_PRI] : '3';
|
||||||
|
}
|
||||||
$oDel = new AppDelegation;
|
$oDel = new AppDelegation;
|
||||||
$array = array();
|
$array = array();
|
||||||
$array['APP_UID'] = $sAppUid;
|
$array['APP_UID'] = $sAppUid;
|
||||||
$array['DEL_INDEX'] = $DEL_INDEX;
|
$array['DEL_INDEX'] = $DEL_INDEX;
|
||||||
$array['TAS_UID'] = $TAS_UID;
|
$array['TAS_UID'] = $TAS_UID;
|
||||||
$array['DEL_PRIORITY'] = (isset($x[$VAR_PRI]) ? ($x[$VAR_PRI] >= 1 && $x[$VAR_PRI] <= 5 ? $x[$VAR_PRI] : '3') : '3');
|
$array['DEL_PRIORITY'] = $priority;
|
||||||
$oDel->update($array);
|
$oDel->update($array);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -663,6 +663,12 @@ class Derivation
|
|||||||
$iAppThreadIndex = $appFields['DEL_THREAD'];
|
$iAppThreadIndex = $appFields['DEL_THREAD'];
|
||||||
$delType = 'NORMAL';
|
$delType = 'NORMAL';
|
||||||
|
|
||||||
|
if (is_numeric($nextDel['DEL_PRIORITY'])) {
|
||||||
|
$nextDel['DEL_PRIORITY'] = (isset($nextDel['DEL_PRIORITY']) ? ($nextDel['DEL_PRIORITY'] >= 1 && $nextDel['DEL_PRIORITY'] <= 5 ? $nextDel['DEL_PRIORITY'] : '3') : '3');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$nextDel['DEL_PRIORITY'] = 3;
|
||||||
|
}
|
||||||
switch ( $nextDel['TAS_ASSIGN_TYPE'] ) {
|
switch ( $nextDel['TAS_ASSIGN_TYPE'] ) {
|
||||||
case 'CANCEL_MI':
|
case 'CANCEL_MI':
|
||||||
case 'STATIC_MI':
|
case 'STATIC_MI':
|
||||||
@@ -680,7 +686,7 @@ class Derivation
|
|||||||
$nextDel['TAS_UID'],
|
$nextDel['TAS_UID'],
|
||||||
(isset($aValue['USR_UID']) ? $aValue['USR_UID'] : ''),
|
(isset($aValue['USR_UID']) ? $aValue['USR_UID'] : ''),
|
||||||
$currentDelegation['DEL_INDEX'],
|
$currentDelegation['DEL_INDEX'],
|
||||||
3, //$nextDel['DEL_PRIORITY'], <- //TODO check this priority alway is 3
|
$nextDel['DEL_PRIORITY'],
|
||||||
$delType,
|
$delType,
|
||||||
$iNewAppThreadIndex,
|
$iNewAppThreadIndex,
|
||||||
$nextDel
|
$nextDel
|
||||||
@@ -700,13 +706,13 @@ 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(
|
$iNewDelIndex = $this->case->newAppDelegation(
|
||||||
$appFields['PRO_UID'],
|
$appFields['PRO_UID'],
|
||||||
$currentDelegation['APP_UID'],
|
$currentDelegation['APP_UID'],
|
||||||
$nextDel['TAS_UID'],
|
$nextDel['TAS_UID'],
|
||||||
(isset($nextDel['USR_UID']) ? $nextDel['USR_UID'] : ''),
|
(isset($nextDel['USR_UID']) ? $nextDel['USR_UID'] : ''),
|
||||||
$currentDelegation['DEL_INDEX'],
|
$currentDelegation['DEL_INDEX'],
|
||||||
3, //$nextDel['DEL_PRIORITY'], <- //TODO check this priority alway is 3
|
$nextDel['DEL_PRIORITY'],
|
||||||
$delType,
|
$delType,
|
||||||
$iAppThreadIndex,
|
$iAppThreadIndex,
|
||||||
$nextDel
|
$nextDel
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ class Task extends BaseTask {
|
|||||||
$this->setTasTypeDay("");
|
$this->setTasTypeDay("");
|
||||||
$this->setTasTimeunit("DAYS");
|
$this->setTasTimeunit("DAYS");
|
||||||
$this->setTasAlert("FALSE");
|
$this->setTasAlert("FALSE");
|
||||||
$this->setTasPriorityVariable("@@SYS_CASE_PRIORITY");
|
$this->setTasPriorityVariable("");
|
||||||
$this->setTasAssignType("BALANCED");
|
$this->setTasAssignType("BALANCED");
|
||||||
$this->setTasAssignVariable("@@SYS_NEXT_USER_TO_BE_ASSIGNED");
|
$this->setTasAssignVariable("@@SYS_NEXT_USER_TO_BE_ASSIGNED");
|
||||||
$this->setTasAssignLocation("FALSE");
|
$this->setTasAssignLocation("FALSE");
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<en>Description</en>
|
<en>Description</en>
|
||||||
</TAS_DESCRIPTION>
|
</TAS_DESCRIPTION>
|
||||||
|
|
||||||
<TAS_PRIORITY_VARIABLE type="textpm" size="48" maxlength="155" defaultvalue="@@SYS_CASE_PRIORITY" showVars="1" process="@#PRO_UID" group="1">
|
<TAS_PRIORITY_VARIABLE type="textpm" size="48" maxlength="155" defaultvalue="" showVars="1" process="@#PRO_UID" group="1">
|
||||||
<en>Variable for Case priority</en>
|
<en>Variable for Case priority</en>
|
||||||
</TAS_PRIORITY_VARIABLE>
|
</TAS_PRIORITY_VARIABLE>
|
||||||
|
|
||||||
@@ -119,4 +119,4 @@ var insertFormVar = function(sFieldName, sValue) {
|
|||||||
|
|
||||||
]]></JS>
|
]]></JS>
|
||||||
|
|
||||||
</dynaForm>
|
</dynaForm>
|
||||||
Reference in New Issue
Block a user