1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-27 11:02:16 +01:00

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"
/>
This commit is contained in:
Nuno Góis 2025-10-15 14:17:34 +01:00 committed by GitHub
parent 10c30751d3
commit f3ab70aeca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,6 +78,9 @@ export const CopyFeatureToggle = () => {
const navigate = useNavigate(); const navigate = useNavigate();
const { isChangeRequestConfiguredInAnyEnv } = const { isChangeRequestConfiguredInAnyEnv } =
useChangeRequestsEnabled(projectId); useChangeRequestsEnabled(projectId);
const hasReleasePlan = feature.environments?.some((env) =>
Boolean(env.releasePlans?.length),
);
const { const {
project: { featureNaming }, project: { featureNaming },
@ -146,6 +149,16 @@ export const CopyFeatureToggle = () => {
</StyledAlert> </StyledAlert>
} }
/> />
<ConditionallyRender
condition={hasReleasePlan}
show={
<StyledAlert severity='warning'>
Cloning a feature flag will not clone the associated
release plans. You will need to set up a new release
plan for the cloned feature flag.
</StyledAlert>
}
/>
<StyledSection> <StyledSection>
<StyledDescription> <StyledDescription>
You are about to create a new feature flag by cloning the You are about to create a new feature flag by cloning the