Skip to content

Commit

Permalink
Add +1 to attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
adhityamamallan committed Dec 13, 2024
1 parent 71feb5a commit d189d1e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<DecisionHistoryGroup> = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
});
}

Expand Down

0 comments on commit d189d1e

Please sign in to comment.