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:
jennylee
2012-12-05 15:14:17 -04:00
parent b3ce58a736
commit e1c36895b1

View File

@@ -155,8 +155,20 @@ if ($action == "uploadFileNewProcess") {
$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 ($processFileType == "pm") {