Skip to content

fix: validate-metadata-required-for-on-all-entities#6658

Merged
Zaimwa9 merged 19 commits intomainfrom
fix/required-metadata-validation
Feb 25, 2026
Merged

fix: validate-metadata-required-for-on-all-entities#6658
Zaimwa9 merged 19 commits intomainfrom
fix/required-metadata-validation

Conversation

@Zaimwa9
Copy link
Copy Markdown
Contributor

@Zaimwa9 Zaimwa9 commented Feb 4, 2026

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Closes #6520

Includes a refactor of the logic in order to prepare #6620

  • Simplified AddMetadataToEntity component
  • Created mergeMetadataFields and metadataValidation in a utils + unit tests
  • Added validation for both update and create for environments and features
  • ⚠️ NB: disabled state for segments has not been implemented as it is on a different page (could be confusing) and error from api is well handled

How did you test this code?

  • New unit tests
  • Create metadata fields in organisation (at least 2 required for each of them)
  • Go to create feature / update feature / create environment / update environment / segments and play around

@Zaimwa9 Zaimwa9 requested a review from a team as a code owner February 4, 2026 17:24
@Zaimwa9 Zaimwa9 requested review from talissoncosta and removed request for a team February 4, 2026 17:24
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview, Comment Feb 24, 2026 4:40pm
flagsmith-frontend-staging Ready Ready Preview, Comment Feb 24, 2026 4:40pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Feb 24, 2026 4:40pm

Request Review

@Zaimwa9 Zaimwa9 marked this pull request as draft February 4, 2026 17:24
@github-actions github-actions Bot added front-end Issue related to the React Front End Dashboard fix labels Feb 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 4, 2026

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-6658 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-6658 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-6658 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-6658 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-6658 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-6658 Finished ✅ Results

Comment thread frontend/web/components/pages/CreateEnvironmentPage.tsx
Comment thread frontend/common/services/useMetadataField.ts
Comment thread frontend/common/utils/__tests__/metadataValidation.test.ts Outdated
talissoncosta
talissoncosta previously approved these changes Feb 6, 2026
Copy link
Copy Markdown
Contributor

@talissoncosta talissoncosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just some non blocking comments

Comment thread frontend/web/components/metadata/AddMetadataToEntity.tsx
Comment thread frontend/web/components/metadata/AddMetadataToEntity.tsx
@github-actions github-actions Bot added fix and removed fix labels Feb 24, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment thread frontend/common/utils/mergeMetadataFields.ts
Comment thread frontend/web/components/pages/CreateEnvironmentPage.tsx
talissoncosta
talissoncosta previously approved these changes Feb 24, 2026
@Zaimwa9 Zaimwa9 merged commit b67f520 into main Feb 25, 2026
41 of 42 checks passed
@Zaimwa9 Zaimwa9 deleted the fix/required-metadata-validation branch February 25, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom Fields mandatory field UI/UX bug

2 participants