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

Enforce field-metadata options field to have UPPERCASE values for SELECT fields for standard objects #4380

Open
Weiko opened this issue Mar 8, 2024 · 9 comments

Comments

@Weiko
Copy link
Member

Weiko commented Mar 8, 2024

Scope & Context

Enforce field-metadata options field to have UPPERCASE values for SELECT fields to have consistent format in the DB for enum values.

Screenshot 2024-09-16 at 14 41 45

Technical inputs

Probably check in the FieldMetadata decorator.
If options is provided, try to validate and throw if it's not correct (would throw during metadata sync).

@Weiko Weiko moved this from 🆕 New to 📋 Backlog in Product development ✅ Mar 11, 2024
@Weiko Weiko moved this from 📋 Backlog to 🔖 Planned in Product development ✅ Mar 14, 2024
@Weiko Weiko self-assigned this Mar 18, 2024
@charlesBochet
Copy link
Member

check unicity

@FelixMalfait
Copy link
Member

Still relevant?

@FelixMalfait FelixMalfait removed the T label Sep 13, 2024
@charlesBochet
Copy link
Member

@FelixMalfait Yes!
Let's assign this one to gitstart

@ijreilly FYI

Copy link
Contributor

gitstart-app bot commented Sep 14, 2024

Here is the GitStart Ticket for this issue: https://clients.gitstart.com/twenty/5449/tickets/TWNTY-4380

@ijreilly
Copy link
Collaborator

@charlesBochet why do we need that?
@Weiko I don't understand your point or comparing with the original value, can you clarify? thank you !

@Weiko Weiko changed the title Enforce field-metadata options field to have UPPERCASE values for standard objects Enforce field-metadata options field to have UPPERCASE values for SELECT fields Sep 16, 2024
@Weiko
Copy link
Member Author

Weiko commented Sep 16, 2024

@charlesBochet why do we need that? @Weiko I don't understand your point or comparing with the original value, can you clarify? thank you !

Sorry, this was not very clear. I mean before saving the value in DB we need to make sure it's in uppercase. One way to do it would be to do

value === value.toUpperCase()

@ijreilly

@Weiko Weiko changed the title Enforce field-metadata options field to have UPPERCASE values for SELECT fields Enforce field-metadata options field to have UPPERCASE values for SELECT fields for standard objects Sep 16, 2024
@Weiko
Copy link
Member Author

Weiko commented Sep 16, 2024

I've updated the description @ijreilly

@ijreilly ijreilly added the good first issue Good for newcomers label Sep 25, 2024
@Cyanhead
Copy link

Cyanhead commented Oct 5, 2024

Hi, I'm unable to locate the affected files to resolve this. Can get a lead please? @Weiko

@Weiko
Copy link
Member Author

Weiko commented Oct 7, 2024

Hi @Cyanhead, this is pretty much this PR #4381
The reason why we closed it is because we wanted to fix existing enums via a command which is not done in the PR
cc @charlesBochet @ijreilly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants