Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component unique fields #20427

Merged
merged 23 commits into from
Jun 18, 2024
Merged

Component unique fields #20427

merged 23 commits into from
Jun 18, 2024

Conversation

jhoward1994
Copy link
Contributor

@jhoward1994 jhoward1994 commented Jun 4, 2024

What does it do?

Re implements component unique fields in V5

According to the logic:

  • Component unique fields are validated against values in other entries of their parent content type in the same dimensions (locale and publication state)
  • All unique values in a repeatable must be unique in the current entity
  • The order of components in a repeatable does not matter. Validation will fail if any other entry (of content type + dimensions) holds the same value in the same component field anywhere in the repeatable

Why is it needed?

Fix existing V4 bugs and implement core v5 functionality

How to test it?

API tests
E2E tests

Related issue(s)/PR(s)

DX-1348

WIP

  • E2E tests
  • Update types for new CTs in API tests
  • Add repeatable cases to E2E

closes #12541
closes #12248
closes #10107
closes #17604
closes #16918

@jhoward1994 jhoward1994 self-assigned this Jun 4, 2024
@jhoward1994 jhoward1994 changed the title feat: wip component unique fields Component unique fields Jun 4, 2024
@jhoward1994 jhoward1994 added pr: feature This PR adds a new feature version: 5 labels Jun 4, 2024
Copy link

vercel bot commented Jun 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
contributor-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 18, 2024 11:15am

@jhoward1994
Copy link
Contributor Author

Hey @innerdvations & @Bassel17 the WIPs are complete now so this is ready for review 🙏🏻

Copy link
Contributor

@innerdvations innerdvations left a comment

Choose a reason for hiding this comment

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

Overall looks great! Just a few small comments

@innerdvations
Copy link
Contributor

And API tests are failing, but that may be the issue on v5/main. Once we know they're fixed we can run them again.

@jhoward1994
Copy link
Contributor Author

jhoward1994 commented Jun 18, 2024

Known issue with dynamic zones tracked here #20546

ab8e36f - Sets up the correct component context for dynamic zone fields but more work will be required to fix this bug at the query layer

@jhoward1994
Copy link
Contributor Author

This PR fixes the following issues in Strapi v5

closes #12541
closes #12248
closes #10107
closes #17604
closes #16918

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: feature This PR adds a new feature version: 5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants