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:
parent
10c30751d3
commit
f3ab70aeca
@ -78,6 +78,9 @@ export const CopyFeatureToggle = () => {
|
||||
const navigate = useNavigate();
|
||||
const { isChangeRequestConfiguredInAnyEnv } =
|
||||
useChangeRequestsEnabled(projectId);
|
||||
const hasReleasePlan = feature.environments?.some((env) =>
|
||||
Boolean(env.releasePlans?.length),
|
||||
);
|
||||
|
||||
const {
|
||||
project: { featureNaming },
|
||||
@ -146,6 +149,16 @@ export const CopyFeatureToggle = () => {
|
||||
</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>
|
||||
<StyledDescription>
|
||||
You are about to create a new feature flag by cloning the
|
||||
|
||||
Loading…
Reference in New Issue
Block a user