feat: support project level custom fields#6736
Open
Zaimwa9 wants to merge 15 commits intofix/required-metadata-validationfrom
Open
feat: support project level custom fields#6736Zaimwa9 wants to merge 15 commits intofix/required-metadata-validationfrom
Zaimwa9 wants to merge 15 commits intofix/required-metadata-validationfrom
Conversation
…th/flagsmith into feat/support-project-level-custom-fields
…th/flagsmith into feat/support-project-level-custom-fields
…th/flagsmith into feat/support-project-level-custom-fields
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Contributor
Docker builds report
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## fix/required-metadata-validation #6736 +/- ##
===================================================================
Coverage ? 98.24%
===================================================================
Files ? 1313
Lines ? 48782
Branches ? 0
===================================================================
Hits ? 47928
Misses ? 854
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…:Flagsmith/flagsmith into feat/support-project-level-custom-fields
Zaimwa9
commented
Feb 19, 2026
Comment on lines
+30
to
+45
| migrations.AddConstraint( | ||
| model_name="metadatafield", | ||
| constraint=models.UniqueConstraint( | ||
| condition=models.Q(("project__isnull", True)), | ||
| fields=("name", "organisation"), | ||
| name="unique_org_level_metadata_field", | ||
| ), | ||
| ), | ||
| migrations.AddConstraint( | ||
| model_name="metadatafield", | ||
| constraint=models.UniqueConstraint( | ||
| condition=models.Q(("project__isnull", False)), | ||
| fields=("name", "organisation", "project"), | ||
| name="unique_project_level_metadata_field", | ||
| ), | ||
| ), |
Contributor
Author
There was a problem hiding this comment.
I'm not sure this is compatible with Oracle. Is it a requirement ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Closes #6620
Support project scoped custom fields which could only be defined at organisation levels
MetadataFieldunique_togetherwith conditionalUniqueConstraints_validate_required_metadataaccepts project paramis_required_forfetched and included in responses directly (replacing 2 different requests made in the frontend => coming in next branch)New endpoint
?include_organisationto include inherited org-level fields (calculates the precedence for project in case of conflicts)?entity=feature|segment|environmentto only return fields of the given identity (simplifies the creation of the identity)In case of conflicting name, project custom fields takes precedence and org ones are skipped
How did you test this code?