fix: active cycle filter (#5217)

This commit is contained in:
Akshita Goyal
2024-07-24 16:53:09 +05:30
committed by GitHub
parent ca088a464f
commit 58f203dd38
2 changed files with 5 additions and 3 deletions

View File

@@ -56,8 +56,8 @@ export const ActiveCycleProductivity: FC<ActiveCycleProductivityProps> = observe
const completionChartDistributionData = chartDistributionData?.completion_chart || undefined;
return cycle ? (
<div className="flex flex-col justify-center min-h-[17rem] gap-5 px-3.5 py-4 bg-custom-background-100 border border-custom-border-200 rounded-lg">
<div className="relative flex items-center justify-between gap-4 -mt-7">
<div className="flex flex-col min-h-[17rem] gap-5 px-3.5 py-4 bg-custom-background-100 border border-custom-border-200 rounded-lg">
<div className="relative flex items-center justify-between gap-4">
<Link href={`/${workspaceSlug}/projects/${projectId}/cycles/${cycle?.id}`}>
<h3 className="text-base text-custom-text-300 font-semibold">Issue burndown</h3>
</Link>

View File

@@ -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;
}