Skip to content

Commit 6212fdc

Browse files
fix(plugin-approvals): label the approval request's record_id "Record", since the column shows the record and not its id (#28347)
domain:spec#2 · os-tesla · session_01L9qibx5r5nhDMwpRs4SL6D <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoWhH54PfJ4zCeekSwbSNYhf)_ Fixes #28250 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:审批请求(sys_approval_request)的 `record_id` 字段显示名由 “Record ID” 改为 “Record”;中文 “记录”、日文 “レコード”、西班牙文 “Registro” 同步改。 - 为什么改:Setup › 审批请求列表里这一列显示的是目标记录的图标和名称,不是 ID;表头写 “Record ID” 让管理员去找一个并不存在的 ID(HotCRM 客户走查 S9 发现)。 - 风险与回滚:只改显示名;字段名 `record_id`、查询、种子数据、与 `object_name` 的指针对、记录锁都不变;回滚即 revert 本 PR。 - 先看:packages/plugins/plugin-approvals/src/sys-approval-request.object.ts(record_id 的 label)、packages/plugins/plugin-approvals/src/translations/zh-CN.objects.generated.ts(sys_approval_request.fields.record_id)。 - 两分钟验证:在 Console 打开 Setup › 审批请求,四个列表视图的表头、请求详情页的亮点条与 Details 标签都显示 “Record”(中文界面显示 “记录”)。 - 需要你做的:无,席位落地。 ## What changes The Approval Requests list views draw the `record_id` cell as the target record (its object's icon and name), because `record_id` is the id half of the request's pointer pair with `object_name` (ADR-0052 §5). The header "Record ID" therefore disagreed with the cell. - `packages/plugins/plugin-approvals/src/sys-approval-request.object.ts`: `record_id` label `'Record ID'` becomes `'Record'`. Nothing else in the field moves. - `packages/plugins/plugin-approvals/src/translations/en.objects.generated.ts`: regenerated by `node scripts/check-i18n-bundles.mjs --write`; the only diff across all nine bundle packages is this one leaf. - zh-CN / ja-JP / es-ES hand values: 记录 ID → 记录, レコード ID → レコード, ID de registro → Registro. These are the words the same plugin already uses for `sys_approval_action.record_id` ("Record"), so the two approval objects now agree. The leaf has no source-hash entry in any locale, so no hash table moves. - Changeset: `@objectstack/plugin-approvals` patch. ## Tests No test pinned the old label (`git grep` for each of the four old strings outside the bundles: 0 hits in tests, 0 under `ui/`), and a label is display copy no consumer parses, so no new pin is added. The pointer-pair, query and seed tests are untouched and pass unchanged. ## Acceptance notes - `object_name` keeps its label "Object". It is not a list column (no list view shows a pointer's type half), and on the Details tab "Object" beside "Record" reads correctly, so it is not the same defect. - `origin/main` moved after branch-off; `git merge-tree` against it is clean and none of the incoming files are this PR's. - Same pattern elsewhere, carried by the seat as its own `domain:server` card: `sys_audit_log` and `sys_activity` (plugin-audit) also declare `record_id` with `referenceVia` and keep "Record ID". `sys_mail_association.record_id` (service-mailbox) is a different case: its record page shows it only in the highlights strip, which draws the stored id, so its label is right until that strip leaves it out. ## Verification All readings at head `f17b7d75` on objectstack-ai/objectstack (merge base `501c864d`), unless a line names an earlier head. <details><summary>Tests</summary> - At `27ee7b7d` (the later commits change only the changeset text in this package's scope): `pnpm --filter @objectstack/plugin-approvals test`: Tests 1361/1361 passed; `pnpm --filter @objectstack/plugin-approvals typecheck` (tsc, scripts tsconfig, test-typecheck ledger held): lock VERDICT command-exit 0. - `node scripts/check-i18n-bundles.mjs --write`: exit 0; only `en.objects.generated.ts` changed, by the one leaf. </details> <details><summary>Gates</summary> - Build: the i18n prerequisite closure (62/62 tasks) and then `turbo run build --filter='./packages/**'` (77/77 tasks), lock VERDICT command-exit 0 both. - `dispatch-gates --commands` at `f17b7d75`: 55 families (the same list as at `27ee7b7d`), each run with stdin from `/dev/null`, exit codes recorded before any pipe. `--ran`: 55 derived, 55 run, 0 NOT-MEASURED, 0 UNRUN, 0 red. - All 55 answered exit 0 on the first run at this head. At `27ee7b7d` two had first answered exit 3 (prerequisite not met) until their prerequisites were cleared: `check-plugin-teardown-shape --self-test` (its pinned control commit `621a4876` fetched into the shallow clone) and `check:dual-build-cjs-loads` (after the packages build). - The full CI farm (`test:repo`, the UI lanes) is CI's. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01L9qibz9o2UXx9eqto4hqY3)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent f048e42 commit 6212fdc

6 files changed

Lines changed: 15 additions & 5 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/plugin-approvals': patch
3+
---
4+
5+
fix(plugin-approvals): the approval request's `record_id` field is labelled "Record", not "Record ID"
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The column shows the target record's name and icon, so the header "Record ID" told an administrator reading Setup › Approval Requests to look for an id that is not there. The new label reads "Record" in every approvals list view and the request's Details tab (its highlights strip leaves `record_id` out), and in the zh-CN (记录), ja-JP (レコード) and es-ES (Registro) packs, matching the approval action's own `record_id` label. Only the label moves: the field name `record_id`, its queries, its seeds and its pointer pair with `object_name` are unchanged.

‎packages/plugins/plugin-approvals/src/sys-approval-request.object.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ export const SysApprovalRequest = ObjectSchema.create({
267267
}),
268268

269269
record_id: Field.text({
270-
label: 'Record ID',
270+
label: 'Record',
271271
required: true,
272272
maxLength: 100,
273273
// [#11386] The id half of this object's pointer pair (ADR-0052 §5),

‎packages/plugins/plugin-approvals/src/translations/en.objects.generated.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
4343
label: "Object"
4444
},
4545
record_id: {
46-
label: "Record ID"
46+
label: "Record"
4747
},
4848
submitter_id: {
4949
label: "Submitter"

‎packages/plugins/plugin-approvals/src/translations/es-ES.objects.generated.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
4343
label: "Objeto"
4444
},
4545
record_id: {
46-
label: "ID de registro"
46+
label: "Registro"
4747
},
4848
submitter_id: {
4949
label: "Solicitante"

‎packages/plugins/plugin-approvals/src/translations/ja-JP.objects.generated.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
4343
label: "オブジェクト"
4444
},
4545
record_id: {
46-
label: "レコード ID"
46+
label: "レコード"
4747
},
4848
submitter_id: {
4949
label: "送信者"

‎packages/plugins/plugin-approvals/src/translations/zh-CN.objects.generated.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const zhCNObjects: NonNullable<TranslationData['objects']> = {
4343
label: "对象"
4444
},
4545
record_id: {
46-
label: "记录 ID"
46+
label: "记录"
4747
},
4848
submitter_id: {
4949
label: "提交人"

0 commit comments

Comments
 (0)