Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .changeset/20059-identity-objects-title-formula.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
"@objectstack/platform-objects": patch
---

fix(platform-objects): ten identity objects declare their record title instead of having `nameField: 'id'` stamped on them (#20059)

Clause-②: no

ADR-0079 resolves a record's title as `nameField`, then `displayNameField`, then a derivation, and an explicit `nameField` takes precedence over the render-only `titleFormat`. Ten identity objects declared a `titleFormat` and no title pointer. The registry's designate-only pass derived `id`, the first title-eligible field on each of them, and stamped `nameField: 'id'`, and a `/meta` read serves that stamp as if it were declared. A renderer that follows ADR-0079's order therefore showed the raw record id as the record page's title.

Nine of them now declare `display_title`, a formula field with `returnType: 'text'` over the columns their `titleFormat` names, and point `nameField` and `displayNameField` at it:

- `sys_account`: `{provider_id} - {account_id}`;
- `sys_business_unit_member`: `{user_id} in {business_unit_id}`;
- `sys_invitation`: `Invitation for {email}`;
- `sys_member`: `{user_id} ({role})`. A row without a role is titled by its user alone;
- `sys_scim_group_member`: `{scim_user_id} in {group_id}`;
- `sys_scim_projection_grant`: `{role} → {user_id}`;
- `sys_team_member`: `{user_id} in {team_id}`;
- `sys_two_factor`: `Two-factor for {user_id}`;
- `sys_verification`: `Verification for {identifier}`.

This is the migration the `titleFormat` schema text prescribes: "a composite to a formula field designated as nameField". `sys_scim_subject` has a single-field title (`{user_id}`), so its `nameField` and `displayNameField` name `user_id` directly, as the same text prescribes for a single field.

A formula field is computed when a record is read. It adds no database column, so no schema migration runs. Record reads now carry `display_title` on the nine objects. A formula is evaluated on the stored row, so where a `titleFormat` names a lookup (`user_id`, `team_id`, `business_unit_id`, `group_id`, `scim_user_id`), the formula's text carries the stored id of the related record, not its name.

`titleFormat` stays on all ten objects, unchanged, for renderers that still read it first. `$search` resolution is unchanged: neither a formula field, a lookup nor `id` is ever a search target.
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "Account ID"
},
display_title: {
label: "Title",
help: "Record title: the provider and the account id it issued (computed on read)"
},
created_at: {
label: "Created At"
},
Expand Down Expand Up @@ -499,6 +503,10 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "Verification ID"
},
display_title: {
label: "Title",
help: "Record title: the identifier being verified (computed on read)"
},
created_at: {
label: "Created At"
},
Expand Down Expand Up @@ -606,6 +614,10 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "Member ID"
},
display_title: {
label: "Title",
help: "Record title: the member and, when recorded, their role (computed on read)"
},
created_at: {
label: "Created At"
},
Expand Down Expand Up @@ -668,6 +680,10 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "Invitation ID"
},
display_title: {
label: "Title",
help: "Record title: the invited email address (computed on read)"
},
created_at: {
label: "Created At"
},
Expand Down Expand Up @@ -815,6 +831,10 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "Team Member ID"
},
display_title: {
label: "Title",
help: "Record title: the user and the team (computed on read)"
},
created_at: {
label: "Created At"
},
Expand Down Expand Up @@ -932,6 +952,10 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "Member ID"
},
display_title: {
label: "Title",
help: "Record title: the user and the business unit they are assigned to (computed on read)"
},
business_unit_id: {
label: "Business Unit"
},
Expand Down Expand Up @@ -1049,6 +1073,10 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "Two Factor ID"
},
display_title: {
label: "Title",
help: "Record title: the user the credential belongs to (computed on read)"
},
created_at: {
label: "Created At"
},
Expand Down Expand Up @@ -2091,6 +2119,10 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "ID"
},
display_title: {
label: "Title",
help: "Record title: the provisioned user and the group (computed on read)"
},
connection_id: {
label: "Connection ID"
},
Expand Down Expand Up @@ -2162,6 +2194,10 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "ID"
},
display_title: {
label: "Title",
help: "Record title: the projected role and the user it is granted to (computed on read)"
},
connection_id: {
label: "Connection ID"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "ID de cuenta de autenticación"
},
display_title: {
label: "Título",
help: "Título del registro: el proveedor y el ID de cuenta que emitió (calculado al leer)"
},
created_at: {
label: "Creado el"
},
Expand Down Expand Up @@ -499,6 +503,10 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "ID de verificación"
},
display_title: {
label: "Título",
help: "Título del registro: el identificador que se verifica (calculado al leer)"
},
created_at: {
label: "Creado el"
},
Expand Down Expand Up @@ -606,6 +614,10 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "ID de miembro"
},
display_title: {
label: "Título",
help: "Título del registro: el miembro y, si consta, su rol (calculado al leer)"
},
created_at: {
label: "Creado el"
},
Expand Down Expand Up @@ -668,6 +680,10 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "ID de invitación"
},
display_title: {
label: "Título",
help: "Título del registro: la dirección de correo electrónico invitada (calculado al leer)"
},
created_at: {
label: "Creado el"
},
Expand Down Expand Up @@ -815,6 +831,10 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "ID de miembro del equipo"
},
display_title: {
label: "Título",
help: "Título del registro: el usuario y el equipo (calculado al leer)"
},
created_at: {
label: "Creado el"
},
Expand Down Expand Up @@ -932,6 +952,10 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "ID de miembro"
},
display_title: {
label: "Título",
help: "Título del registro: el usuario y la unidad de negocio a la que está asignado (calculado al leer)"
},
business_unit_id: {
label: "Unidad de negocio"
},
Expand Down Expand Up @@ -1049,6 +1073,10 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "ID de doble factor"
},
display_title: {
label: "Título",
help: "Título del registro: el usuario al que pertenece la credencial (calculado al leer)"
},
created_at: {
label: "Creado el"
},
Expand Down Expand Up @@ -2091,6 +2119,10 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "ID"
},
display_title: {
label: "Título",
help: "Título del registro: el usuario aprovisionado y el grupo (calculado al leer)"
},
connection_id: {
label: "Connection ID"
},
Expand Down Expand Up @@ -2162,6 +2194,10 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "ID"
},
display_title: {
label: "Título",
help: "Título del registro: el rol proyectado y el usuario al que se concede (calculado al leer)"
},
connection_id: {
label: "Connection ID"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "アカウント ID"
},
display_title: {
label: "タイトル",
help: "レコードタイトル:プロバイダーと、そのプロバイダーが発行したアカウント ID(読み取り時に計算)"
},
created_at: {
label: "作成日時"
},
Expand Down Expand Up @@ -499,6 +503,10 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "検証 ID"
},
display_title: {
label: "タイトル",
help: "レコードタイトル:検証対象の識別子(読み取り時に計算)"
},
created_at: {
label: "作成日時"
},
Expand Down Expand Up @@ -606,6 +614,10 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "メンバー ID"
},
display_title: {
label: "タイトル",
help: "レコードタイトル:メンバーと、記録されている場合はそのロール(読み取り時に計算)"
},
created_at: {
label: "作成日時"
},
Expand Down Expand Up @@ -668,6 +680,10 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "招待 ID"
},
display_title: {
label: "タイトル",
help: "レコードタイトル:招待先のメールアドレス(読み取り時に計算)"
},
created_at: {
label: "作成日時"
},
Expand Down Expand Up @@ -815,6 +831,10 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "チームメンバー ID"
},
display_title: {
label: "タイトル",
help: "レコードタイトル:ユーザーとチーム(読み取り時に計算)"
},
created_at: {
label: "作成日時"
},
Expand Down Expand Up @@ -932,6 +952,10 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "メンバー ID"
},
display_title: {
label: "タイトル",
help: "レコードタイトル:ユーザーと、その割り当て先のビジネスユニット(読み取り時に計算)"
},
business_unit_id: {
label: "ビジネスユニット"
},
Expand Down Expand Up @@ -1049,6 +1073,10 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "二要素認証 ID"
},
display_title: {
label: "タイトル",
help: "レコードタイトル:この認証情報を所有するユーザー(読み取り時に計算)"
},
created_at: {
label: "作成日時"
},
Expand Down Expand Up @@ -2091,6 +2119,10 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "ID"
},
display_title: {
label: "タイトル",
help: "レコードタイトル:プロビジョニングされたユーザーとグループ(読み取り時に計算)"
},
connection_id: {
label: "Connection ID"
},
Expand Down Expand Up @@ -2162,6 +2194,10 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
id: {
label: "ID"
},
display_title: {
label: "タイトル",
help: "レコードタイトル:投影されたロールと、その付与先のユーザー(読み取り時に計算)"
},
connection_id: {
label: "Connection ID"
},
Expand Down
Loading
Loading