This commit is contained in:
hjonathan
2017-05-18 09:46:19 -04:00
parent 4c97a3451d
commit 9e561c75df
3 changed files with 26 additions and 6 deletions

View File

@@ -70,6 +70,7 @@ class Applications
APP_DELEGATION.DEL_DELAYED,
APP_DELEGATION.DEL_DELAY_DURATION,
TASK.TAS_TITLE AS APP_TAS_TITLE,
TASK.TAS_TYPE AS APP_TAS_TYPE,
USERS.USR_LASTNAME,
USERS.USR_FIRSTNAME,
USERS.USR_USERNAME,

View File

@@ -1462,7 +1462,7 @@ class Derivation
$appFields['PRO_UID'],
$currentDelegation['APP_UID'],
$nextDel['TAS_UID'],
(isset( $nextDel['USR_UID'] ) ? $nextDel['USR_UID'] : ''),
$this->verifyCurrentUserInTask($nextDel, $aSP),
$currentDelegation['DEL_INDEX'],
$nextDel['DEL_PRIORITY'],
$delType,
@@ -1645,6 +1645,22 @@ class Derivation
return $iNewDelIndex;
}
/**
* This function returns the current user Checking cases where USR_ID exists or checking a subprocess (SYNCHRONOUS)
* @param $nextDel
* @param null $aSP
* @return string
*/
function verifyCurrentUserInTask($nextDel, $aSP = null)
{
if (isset($aSP) && $aSP["SP_SYNCHRONOUS"] == "1") {
$currentUser = "";
} else {
$currentUser = isset($nextDel['USR_UID']) ? $nextDel['USR_UID'] : "";
}
return $currentUser;
}
/**
* This function create, update and closed a new record related to appThread
*

View File

@@ -588,12 +588,15 @@ Ext.onReady ( function() {
//Render Full Name
full_name = function (v, x, s) {
var resp;
if (s.data.USR_UID && s.data.USR_USERNAME) {
return _FNF(s.data.USR_USERNAME, s.data.USR_FIRSTNAME, s.data.USR_LASTNAME);
}
else {
return '[' + _('ID_UNASSIGNED').toUpperCase() + ']';
resp = _FNF(s.data.USR_USERNAME, s.data.USR_FIRSTNAME, s.data.USR_LASTNAME);
} else if (s && s.json && s.json["APP_TAS_TYPE"] === "SUBPROCESS") {
resp = '';
} else {
resp = '[' + _('ID_UNASSIGNED').toUpperCase() + ']';
}
return resp;
};
previous_full_name = function(v, x, s) {