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

Field name and options should be normalized to A-Z+0-9 #3296

Closed
FelixMalfait opened this issue Jan 8, 2024 · 3 comments · Fixed by #3738
Closed

Field name and options should be normalized to A-Z+0-9 #3296

FelixMalfait opened this issue Jan 8, 2024 · 3 comments · Fixed by #3738
Assignees
Labels
scope: backend Issues that are affecting the backend side only type: bug Something isn't working

Comments

@FelixMalfait
Copy link
Member

I tried to create a field "industry" on the company object.
One of the options had emoji in its value:
Screenshot 2024-01-08 at 12 15 35

But now my workspace is broken and I get this error everywhere:
Screenshot 2024-01-08 at 12 04 54

Related: #3066 #2146

@FelixMalfait FelixMalfait added type: bug Something isn't working scope: backend Issues that are affecting the backend side only labels Jan 8, 2024
Copy link

sentry-io bot commented Jan 8, 2024

Sentry issue: PROD-3C

@AdityaPimpalkar
Copy link
Contributor

Hey @FelixMalfait I encountered a similar issue in #3270.

It looks like while create options, we are assigning value property as the Name of enum. This error is thrown because GraphQL has internal validation on GraphQLEnumType. I did a workaround from the front end to solve this, but I guess that shouldn't be long term solution.

@magrinj
Copy link
Member

magrinj commented Jan 9, 2024

@AdityaPimpalkar You're right the problem is actually also related to #3270, but in that case the name inside the enum are chosen by the user. We should change the regex to only accept [a-zA-Z]+, and drop number and emoji support.

We should add a new field inside FieldMetadataDefaultOptions for emoji, and contact it in the front side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: backend Issues that are affecting the backend side only type: bug Something isn't working
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants