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 4b2d520903..660d9c69b4 100644
--- a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/MilestoneAutomation.tsx
+++ b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/MilestoneAutomation.tsx
@@ -82,16 +82,20 @@ export const MilestoneAutomation = ({
return null;
}
+ // When milestone has no original transitionCondition but has a pending changeMilestoneProgression, it's a create
+ const isOriginallyEmpty = !milestone.transitionCondition;
const hasPendingCreate =
- pendingProgressionChange?.action === 'createMilestoneProgression';
+ isOriginallyEmpty &&
+ pendingProgressionChange?.action === 'changeMilestoneProgression';
const hasPendingChange =
+ !isOriginallyEmpty &&
pendingProgressionChange?.action === 'changeMilestoneProgression';
const hasPendingDelete =
pendingProgressionChange?.action === 'deleteMilestoneProgression';
const badge = hasPendingDelete ? (
Deleted in draft
- ) : hasPendingChange ? (
+ ) : hasPendingChange || hasPendingCreate ? (
Modified in draft
) : undefined;
diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/ReleasePlanMilestoneItem.tsx b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/ReleasePlanMilestoneItem.tsx
index eaff57ffdc..cdfc7401c4 100644
--- a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/ReleasePlanMilestoneItem.tsx
+++ b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/ReleasePlanMilestoneItem.tsx
@@ -97,7 +97,8 @@ export const ReleasePlanMilestoneItem = ({
sourceMilestone: milestone.id,
},
});
- return { shouldReset: true };
+ handleCloseProgressionForm();
+ return {};
}
try {
diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/pendingProgressionChanges.ts b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/pendingProgressionChanges.ts
index f37c6d3788..3d5c4a6f7d 100644
--- a/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/pendingProgressionChanges.ts
+++ b/frontend/src/component/feature/FeatureView/FeatureOverview/ReleasePlan/ReleasePlanMilestoneItem/pendingProgressionChanges.ts
@@ -15,10 +15,10 @@ export const getPendingProgressionData = (
): PendingProgressionChangeResult => {
const pendingProgressionChange = getPendingProgressionChange(milestone.id);
- // Determine effective transition condition (use pending create if exists)
+ // Determine effective transition condition (use pending change if exists)
let effectiveTransitionCondition = milestone.transitionCondition;
if (
- pendingProgressionChange?.action === 'createMilestoneProgression' &&
+ pendingProgressionChange?.action === 'changeMilestoneProgression' &&
'transitionCondition' in pendingProgressionChange.payload &&
pendingProgressionChange.payload.transitionCondition
) {