Skip to content

Commit

Permalink
fix: fix playbook runs with pending status missing in the list
Browse files Browse the repository at this point in the history
Fixes #2305
  • Loading branch information
mainawycliffe authored and moshloop committed Oct 16, 2024
1 parent 59490f0 commit f2078a6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/api/services/playbooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@ export async function getPlaybookRuns({
searchParams.append("offset", (pageIndex * pageSize).toString());
searchParams.append("order", "created_at.desc");

if (starts && ends) {
searchParams.append(
"or",
`(and(start_time.gte.${starts},start_time.lte.${ends}),and(created_at.gte.${starts},created_at.lte.${ends}))`
);
}

if (playbookId) {
searchParams.append("playbook_id", `eq.${playbookId}`);
}
Expand Down

0 comments on commit f2078a6

Please sign in to comment.