BUG-7987 When importing a process which is created by a user that does not exist, the 'Process Owner' column shows empty.
I added a validation in file 'workflow/engine/methods/processes/processes_Import_Ajax.php' to change PROCESS.PRO_CREATE_USER value in the database to the current user.
This commit is contained in:
@@ -155,8 +155,20 @@ if ($action == "uploadFileNewProcess") {
|
|||||||
$result->ExistGroupsInDatabase = 0;
|
$result->ExistGroupsInDatabase = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//!respect of the groups
|
|
||||||
|
|
||||||
|
//replacing a nonexistent user for the current user
|
||||||
|
$UsrUid = $oData->process['PRO_CREATE_USER'];
|
||||||
|
|
||||||
|
G::LoadClass( 'Users' );
|
||||||
|
$user = new Users();
|
||||||
|
$existUser = $user->userExists( $UsrUid );
|
||||||
|
if ($existUser == false)
|
||||||
|
{
|
||||||
|
$UsrUid = $_SESSION['USER_LOGGED'];
|
||||||
|
$oData->process['PRO_CREATE_USER'] = $UsrUid;
|
||||||
|
}
|
||||||
|
|
||||||
|
//!respect of the groups
|
||||||
|
|
||||||
if ($result->ExistProcessInDatabase == 0 && $result->ExistGroupsInDatabase == 0) {
|
if ($result->ExistProcessInDatabase == 0 && $result->ExistGroupsInDatabase == 0) {
|
||||||
if ($processFileType == "pm") {
|
if ($processFileType == "pm") {
|
||||||
|
|||||||
Reference in New Issue
Block a user