diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/MilestoneAutomation.tsx b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/MilestoneAutomation.tsx
index 456243c024..d99ac6eacc 100644
--- a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/MilestoneAutomation.tsx
+++ b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/MilestoneAutomation.tsx
@@ -54,13 +54,12 @@ export const MilestoneAutomation = ({
pendingProgressionChange?.action === 'changeMilestoneProgression';
const hasPendingDelete =
pendingProgressionChange?.action === 'deleteMilestoneProgression';
- const isPaused = Boolean(milestone.pausedAt);
const badge = hasPendingDelete ? (
Deleted in draft
) : hasPendingChange ? (
Modified in draft
- ) : isPaused ? (
+ ) : status?.type === 'paused' ? (
}>
Paused
diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/hooks/getMilestoneProgressionInfo.test.ts b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/hooks/getMilestoneProgressionInfo.test.ts
index a1c4f7f4e3..56d44e25a9 100644
--- a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/hooks/getMilestoneProgressionInfo.test.ts
+++ b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/hooks/getMilestoneProgressionInfo.test.ts
@@ -10,6 +10,7 @@ describe('getMilestoneProgressionInfo', () => {
30,
startedAt,
'en-US',
+ undefined,
currentTime,
);
expect(res).toBeTruthy();
@@ -22,9 +23,22 @@ describe('getMilestoneProgressionInfo', () => {
120,
startedAt,
'en-US',
+ undefined,
currentTime,
);
expect(res).toBeTruthy();
expect(res as string).toMatch(/^Will proceed at .* \(in .*\)\.$/);
});
+
+ it('returns null when milestone is paused', () => {
+ const startedAt = '2025-10-31T14:00:00.000Z';
+ const res = getMilestoneProgressionInfo(
+ 120,
+ startedAt,
+ 'en-US',
+ { type: 'paused' },
+ currentTime,
+ );
+ expect(res).toBeNull();
+ });
});
diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/hooks/getMilestoneProgressionInfo.ts b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/hooks/getMilestoneProgressionInfo.ts
index 54cbcb21b8..3fbfd1e54c 100644
--- a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/hooks/getMilestoneProgressionInfo.ts
+++ b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/hooks/getMilestoneProgressionInfo.ts
@@ -1,16 +1,22 @@
import { addMinutes, differenceInMinutes, formatDistance } from 'date-fns';
import { formatDateYMDHM } from 'utils/formatDate.ts';
+import type { MilestoneStatus } from '../ReleasePlanMilestone/ReleasePlanMilestoneStatus.tsx';
export const getMilestoneProgressionInfo = (
intervalMinutes: number,
sourceMilestoneStartedAt: string | null | undefined,
locale: string,
+ status?: MilestoneStatus,
currentTime: Date = new Date(),
): string | null => {
if (!sourceMilestoneStartedAt) {
return null;
}
+ if (status?.type === 'paused') {
+ return null;
+ }
+
const startDate = new Date(sourceMilestoneStartedAt);
const elapsedMinutes = differenceInMinutes(currentTime, startDate);
const proceedDate = addMinutes(startDate, intervalMinutes);
diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/hooks/useMilestoneProgressionInfo.ts b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/hooks/useMilestoneProgressionInfo.ts
index 2f986f3769..b8cb073961 100644
--- a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/hooks/useMilestoneProgressionInfo.ts
+++ b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/hooks/useMilestoneProgressionInfo.ts
@@ -16,5 +16,6 @@ export const useMilestoneProgressionInfo = (
intervalMinutes,
sourceMilestoneStartedAt,
locationSettings.locale,
+ status,
);
};