Incorrect job date_completed in database

Steps to reproduce

The CleanupWorkflowOperationHandler, normally present at the end of workflows, will update all finished operation jobs and their children in cleanUpJobArgument().
The ServiceRegistryJpaImpl update(JpaJob fromDb, JpaJob jpaJob) will then re-set the date_completed on all the jobs, resulting in all jobs having the same, incorrect, date_complete.
The date_completed should only be set once.

Steps to reproduce:
1. Run a workflow that executes a cleanup operation at the end.

Actual Results:
All finished operation jobs and their children in the oc_job table have approximately the same date_completed: select id, parent, operation, date_started, date_completed, run_time, status from oc_job where date_created > "xxx" order by date_created;

Expected Results:
Keep the first date_completed value set.

Workaround (if any):

Status

Assignee

Rute Santos

Reporter

Rute Santos

Severity

Incorrectly Functioning Without Workaround

Tags (folksonomy)

None

Components

Affects versions

5.0
4.2

Priority

Critical
Configure