DarkAssassinator opened a new issue, #11669: URL: https://github.com/apache/dolphinscheduler/issues/11669
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the workflow instance is in the process of executing, the result should be empty, regardless of whether the workflow instance was run for the first time or re-run. But when we re-run the workflow instance , the status show instance is running, but the ***duration*** is displayed as `(the task re-run start time) - (the last task end time)`, which is obviously wrong. Because the workflow instance page will keep query the data from api - ProcessInstanceController-queryProcessInstanceList, the source code just use **_Math.abs(startTime - endTime)_**. Please check the following code: `for (ProcessInstance processInstance : processInstances) { processInstance.setDuration( DateUtils.format2Duration(processInstance.getStartTime(), processInstance.getEndTime())); ... }` ### What you expected to happen When the workflow instanceis running, the duration should be null, ### How to reproduce Step 1. Create a workflow instance and run it. Step 2. After the workflow instance finished, then click "re-run" button, and check the duration when the state show executing. ### Anything else Need to determine in which workflow instance state this duration needs to be empty, i think just **_RUNNING_EXECUTION_** and **_SERIAL_WAIT_**. ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
