diff --git a/src/views/workflow-history/helpers/get-history-group-from-events/get-activity-group-from-events.ts b/src/views/workflow-history/helpers/get-history-group-from-events/get-activity-group-from-events.ts index 9c66a4e4..3f74325e 100644 --- a/src/views/workflow-history/helpers/get-history-group-from-events/get-activity-group-from-events.ts +++ b/src/views/workflow-history/helpers/get-history-group-from-events/get-activity-group-from-events.ts @@ -27,8 +27,9 @@ export default function getActivityGroupFromEvents( } if (startEvent && startEvent[startAttr]?.attempt) { const attempts = startEvent[startAttr].attempt; + badges.push({ - content: `${attempts} Attempt${attempts !== 1 ? 's' : ''}`, + content: `${attempts + 1} Attempts`, }); } if (firstEvent.attributes !== 'activityTaskScheduledEventAttributes') { diff --git a/src/views/workflow-history/helpers/get-history-group-from-events/get-decision-group-from-events.ts b/src/views/workflow-history/helpers/get-history-group-from-events/get-decision-group-from-events.ts index 23443c5b..c20ade79 100644 --- a/src/views/workflow-history/helpers/get-history-group-from-events/get-decision-group-from-events.ts +++ b/src/views/workflow-history/helpers/get-history-group-from-events/get-decision-group-from-events.ts @@ -26,7 +26,7 @@ export default function getDecisionGroupFromEvents( if (scheduleEvent && scheduleEvent[scheduleAttr]?.attempt) { const attempts = scheduleEvent[scheduleAttr].attempt; badges.push({ - content: `${attempts} Attempt${attempts !== 1 ? 's' : ''}`, + content: `${attempts + 1} Attempts`, }); } const eventToLabel: HistoryGroupEventToStringMap = { diff --git a/src/views/workflow-history/helpers/get-history-group-from-events/get-single-event-group-from-events.ts b/src/views/workflow-history/helpers/get-history-group-from-events/get-single-event-group-from-events.ts index dd1c807f..8d78d2c9 100644 --- a/src/views/workflow-history/helpers/get-history-group-from-events/get-single-event-group-from-events.ts +++ b/src/views/workflow-history/helpers/get-history-group-from-events/get-single-event-group-from-events.ts @@ -38,7 +38,7 @@ export default function getSingleEventGroupFromEvents( ) { const attempts = event.workflowExecutionStartedEventAttributes.attempt; badges.push({ - content: `${attempts} Attempt${attempts !== 1 ? 's' : ''}`, + content: `${attempts + 1} Attempts`, }); }