Skip to content

Prevent Flag Defaults: UI enforcement lost in create feature modal refactor #6930

@Holmus

Description

@Holmus

Description

The "Prevent Flag Defaults" project setting no longer hides the value and enabled fields when creating a feature flag. Users can set a value and enabled state during creation, even though the setting description says it "forces the user to create a feature before setting its values per environment".

The backend still works correctly (other environments get enabled=false and no value), but the frontend no longer enforces the intended UX of hiding those fields during creation.

Regression

This was introduced in #6356 (commit 00085cd, 20 Jan 2026). The old CreateFlag.js component checked project.prevent_flag_defaults to:

  1. Hide the value/enabled fields during feature creation
  2. Show an info message: "This will create the feature for all environments, you can edit this feature per environment once the feature is created."

During the refactor to the new create-feature/tabs/CreateFeature.tsx, the hideValue prop was hardcoded to false (line 140) and the prevent_flag_defaults check was dropped.

Expected behaviour

When "Prevent Flag Defaults" is enabled on a project, the create feature form should not show value or enabled state fields - matching the previous behaviour and the setting description.

Steps to reproduce

  1. Enable "Prevent Flag Defaults" in Project Settings > Additional Settings
  2. Create a new feature flag
  3. Observe that value and enabled fields are still visible and editable

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions