Skip to content

Remove number from label identifier list #12831

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

Merged
merged 13 commits into from
Jun 24, 2025

Conversation

prastoin
Copy link
Contributor

@prastoin prastoin commented Jun 24, 2025

Introduction

closes #12780
Removed the number field metadata from the selectable field metadata as identifier

Implemented server side validation and basic coverage on that

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Removes FieldMetadataType.NUMBER from label identifier types, restricting record identifiers to only text and full name fields. This change aligns the data model with its usage as record text in the UI.

  • Removed NUMBER from LABEL_IDENTIFIER_FIELD_METADATA_TYPES in src/modules/object-metadata/constants/LabelIdentifierFieldMetadataTypes.ts
  • Improved type safety by replacing !! operator with isDefined utility in SettingsObjectFieldActiveActionDropdown
  • This is a breaking change that may affect existing implementations using number fields as record identifiers

2 files reviewed, 1 comment
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

github-actions bot commented Jun 24, 2025

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:20663

This environment will automatically shut down when the PR is closed or after 5 hours.

@prastoin prastoin force-pushed the field-metadata-identifier-should-be-text-or-name branch from ff8ff22 to a13fe17 Compare June 24, 2025 16:32
@prastoin
Copy link
Contributor Author

@greptileai trigger

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Major validation and backend implementation updates for label identifier changes, focusing on ensuring only text-based fields can be used as identifiers.

  • Added validateMetadataIdentifierFieldMetadataId utility to enforce label/image identifier validation in src/engine/metadata-modules/utils/validate-metadata-identifier-field-metadata-id.utils.ts
  • Implemented unicity row hook in spreadsheetImportGetUnicityRowHook.ts to properly validate unique constraints during data imports
  • Added comprehensive error tracking with MetricsService integration across GraphQL operations and workflow executions
  • Migrated several database queries from TypeORM to direct SQL via WorkspaceDataSourceService for better performance
  • Updated 30+ localization files to reflect new workspace creation and data model terminology

118 files reviewed, 5 comments
Edit PR Review Bot Settings | Greptile

@prastoin prastoin enabled auto-merge (squash) June 24, 2025 17:28
@prastoin prastoin merged commit 2fc300a into main Jun 24, 2025
59 checks passed
@prastoin prastoin deleted the field-metadata-identifier-should-be-text-or-name branch June 24, 2025 18:05
abdulrahmancodes pushed a commit to abdulrahmancodes/twenty that referenced this pull request Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Field definition is not text or full name field metadata
2 participants