Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Commit

Permalink
Only add pending activity to history if it's started (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
feedmeapples authored Jun 8, 2021
1 parent 7ae078c commit 0fac42f
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ const getEventsFromPendingActivity = (activities, idOffset) => {
return [];
}

return activities.map((a, i) => ({
details: a,
eventId: (idOffset + i + 1).toString(),
eventTime: a.scheduledTime,
eventType: 'ActivityTaskStarted',
}));
return activities
.filter(a => a.state === 'Started')
.map((a, i) => ({
details: a,
eventId: (idOffset + i + 1).toString(),
eventTime: a.scheduledTime,
eventType: 'ActivityTaskStarted',
}));
};

export default getEventsFromPendingActivity;

0 comments on commit 0fac42f

Please sign in to comment.