Skip to content

Commit f3ab70a

Browse files
authored
chore: add alert about release plans when cloning flag (#10802)
https://linear.app/unleash/issue/2-3966/cloning-a-feature-will-not-clone-release-plans Adds an alert when cloning a feature flag with a release plan. Requires the `featureReleasePlans` feature flag. <img width="1162" height="568" alt="image" src="https://github.com/user-attachments/assets/325db586-14b9-4ce4-9d7c-6f680017c6ac" />
1 parent 10c3075 commit f3ab70a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

frontend/src/component/feature/CopyFeature/CopyFeature.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ export const CopyFeatureToggle = () => {
7878
const navigate = useNavigate();
7979
const { isChangeRequestConfiguredInAnyEnv } =
8080
useChangeRequestsEnabled(projectId);
81+
const hasReleasePlan = feature.environments?.some((env) =>
82+
Boolean(env.releasePlans?.length),
83+
);
8184

8285
const {
8386
project: { featureNaming },
@@ -146,6 +149,16 @@ export const CopyFeatureToggle = () => {
146149
</StyledAlert>
147150
}
148151
/>
152+
<ConditionallyRender
153+
condition={hasReleasePlan}
154+
show={
155+
<StyledAlert severity='warning'>
156+
Cloning a feature flag will not clone the associated
157+
release plans. You will need to set up a new release
158+
plan for the cloned feature flag.
159+
</StyledAlert>
160+
}
161+
/>
149162
<StyledSection>
150163
<StyledDescription>
151164
You are about to create a new feature flag by cloning the

0 commit comments

Comments
 (0)