likyh commented on code in PR #2526:
URL: https://github.com/apache/incubator-devlake/pull/2526#discussion_r923322242
##########
config-ui/src/pages/blueprints/blueprint-detail.jsx:
##########
@@ -664,15 +664,12 @@ const BlueprintDetail = (props) => {
status: p.status,
statusLabel: TaskStatusLabels[p.status],
statusIcon: getTaskStatusIcon(p.status),
- startedAt: dayjs(p.beganAt).format('L LTS'),
- completedAt:
- p.status === 'TASK_RUNNING'
- ? ' - '
- : dayjs(p.finishedAt || p.updatedAt).format('L LTS'),
+ startedAt: p.beganAt ? dayjs(p.beganAt).format('L LTS') : '-',
+ completedAt: p.finishedAt ? dayjs(p.updatedAt).format('L LTS') : ' - ',
duration:
- p.status === 'TASK_RUNNING'
Review Comment:
because only check running is not enough. so to avoid complex logic and
changes in future, just check if time is null.
--
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]