diff --git a/web/src/utils/helpers.ts b/web/src/utils/helpers.ts index a61e14b70a..ac43ea6a10 100644 --- a/web/src/utils/helpers.ts +++ b/web/src/utils/helpers.ts @@ -63,7 +63,7 @@ export function comparePipelines(a: Pipeline, b: Pipeline): number { export function comparePipelinesWithStatus(a: Pipeline, b: Pipeline): number { const bPriority = ['pending', 'running', 'started'].includes(b.status) ? 1 : 0; const aPriority = ['pending', 'running', 'started'].includes(a.status) ? 1 : 0; - return bPriority - aPriority; + return bPriority - aPriority || comparePipelines(a, b); } export function isPipelineActive(pipeline: Pipeline): boolean {