colosa/processmaker — pull request #2437 by Jennydmz (2014-06-05 20:46:21+00:00)
Title: BUG-15087 User Owner Field is Erased.

Problem:

Case 1: The same user 'A', creates and imports the process, using the option: "Update the current process...".

Result: The user that created the process, user A in the example, is always the User Owner of the process.

Case 2: User 'A' creates the process, and user 'B' imports the process, using the option: "Update the current process...".

Result: The user that created the process, user A in the example, is always the User Owner of the process.

Case 3: User 'A' creates the process, then this user 'A' is deleted, and user 'B' imports the process, using the option: "Update the current process...".

Result: The User Owner is showed empty.

Reason: When the user 'A' (the one that created the process) is deleted, the delete is only logical not physical in the db, and it is updated with the Status 'CLOSED' and the username of this user is changed to an empty string " ". So, when the process is updated the username is copy like it is in the db, and copy into the User Owner field, showing the empty string " ".

Solution:
A validation was added asking if the user exist, if this doesn't the User Owner is changed to the current user logged, and the same if the user exist but his status is CLOSED.