twenty icon indicating copy to clipboard operation
twenty copied to clipboard

Allow Unicode characters in object names

Open derTuca opened this issue 3 months ago • 0 comments

Scope & Context

There are languages that use characters other than the standard Latin alphabet (in this case the Romanian ț). I would like to create objects with names containing such characters.

Current behavior

The app crashes with an "Unexpected character" error and fails to launch again until the offending entry is deleted from the database.

image

fb23673b04c9 Exception Captured
fb23673b04c9   {
fb23673b04c9     user: {
fb23673b04c9       id: '20202020-9e3b-46d4-a556-88b9ddc2b034',
fb23673b04c9       email: '[email protected]',
fb23673b04c9       firstName: 'Tim',
fb23673b04c9       lastName: 'Apple',
fb23673b04c9       workspaceId: '3b8e6458-5fc1-4e63-8563-008ccddaa6db',
fb23673b04c9       workspaceDisplayName: 'Twenty'
fb23673b04c9     }
fb23673b04c9   }
fb23673b04c9   [
fb23673b04c9     GraphQLError: Names must only contain [_a-zA-Z0-9] but "Declarație" does not.
fb23673b04c9         at assertName (/app/node_modules/graphql/type/assertName.js:31:13)
fb23673b04c9         at new GraphQLObjectType (/app/node_modules/graphql/type/definition.js:680:44)
fb23673b04c9         at ObjectTypeDefinitionFactory.create (/app/packages/twenty-server/dist/src/engine/api/graphql/workspace-schema-builder/factories/object-type-definition.factory.js:46:19)
fb23673b04c9         at /app/packages/twenty-server/dist/src/engine/api/graphql/workspace-schema-builder/type-definitions.generator.js:88:112
fb23673b04c9         at Array.map (<anonymous>)
fb23673b04c9         at TypeDefinitionsGenerator.generateObjectTypeDefs (/app/packages/twenty-server/dist/src/engine/api/graphql/workspace-schema-builder/type-definitions.generator.js:88:57)
fb23673b04c9         at TypeDefinitionsGenerator.generateMetadataTypeDefs (/app/packages/twenty-server/dist/src/engine/api/graphql/workspace-schema-builder/type-definitions.generator.js:82:14)
fb23673b04c9         at TypeDefinitionsGenerator.generate (/app/packages/twenty-server/dist/src/engine/api/graphql/workspace-schema-builder/type-definitions.generator.js:37:14)
fb23673b04c9         at WorkspaceGraphQLSchemaFactory.create (/app/packages/twenty-server/dist/src/engine/api/graphql/workspace-schema-builder/workspace-graphql-schema.factory.js:29:39)
fb23673b04c9         at WorkspaceSchemaFactory.createGraphQLSchema (/app/packages/twenty-server/dist/src/engine/api/graphql/workspace-schema.factory.js:55:82) {
fb23673b04c9       path: undefined,
fb23673b04c9       locations: undefined,
fb23673b04c9       extensions: [Object: null prototype] {}
fb23673b04c9     }
fb23673b04c9   ]

Expected behavior

  1. Until this feature is implemented, the create object form should error out before submitting the form
  2. The API should support characters from other language sets

derTuca avatar Apr 23 '24 19:04 derTuca