diff --git a/dashboard/src/scenes/action/view.js b/dashboard/src/scenes/action/view.js index c595af35f..c89f7479e 100644 --- a/dashboard/src/scenes/action/view.js +++ b/dashboard/src/scenes/action/view.js @@ -86,8 +86,10 @@ const View = () => { const statusChanged = body.status && action.status !== body.status; if (statusChanged) { if ([DONE, CANCEL].includes(body.status)) { - body.completedAt = now(); + // When status changed to finished (done, cancel) completedAt we set it to now if not set. + body.completedAt = body.completedAt || now(); } else { + // When status just changed to "todo" we set completedAt to null (since it's not done yet). body.completedAt = null; } }