From f24b27edca3d930c94e6169f5db6e320c8402af8 Mon Sep 17 00:00:00 2001 From: gakshita Date: Wed, 24 Jul 2024 15:57:41 +0530 Subject: [PATCH] fix: active cycle filter --- web/core/components/cycles/active-cycle/productivity.tsx | 4 ++-- web/core/store/cycle.store.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/web/core/components/cycles/active-cycle/productivity.tsx b/web/core/components/cycles/active-cycle/productivity.tsx index 0e44e66f8ba..4a514f0714a 100644 --- a/web/core/components/cycles/active-cycle/productivity.tsx +++ b/web/core/components/cycles/active-cycle/productivity.tsx @@ -56,8 +56,8 @@ export const ActiveCycleProductivity: FC = observe const completionChartDistributionData = chartDistributionData?.completion_chart || undefined; return cycle ? ( -
-
+
+

Issue burndown

diff --git a/web/core/store/cycle.store.ts b/web/core/store/cycle.store.ts index e47bac6ef02..c48171e1ea8 100644 --- a/web/core/store/cycle.store.ts +++ b/web/core/store/cycle.store.ts @@ -213,7 +213,9 @@ export class CycleStore implements ICycleStore { const projectId = this.rootStore.router.projectId; if (!projectId) return null; const activeCycle = Object.keys(this.cycleMap ?? {}).find( - (cycleId) => this.cycleMap?.[cycleId]?.project_id === projectId + (cycleId) => + this.cycleMap?.[cycleId]?.project_id === projectId && + this.cycleMap?.[cycleId]?.status?.toLowerCase() === "current" ); return activeCycle || null; }