Skip to content

[Decision] The list bulk bar offers only delete: should the platform offer bulk edit? #30079

Closed as not planned

Description

@objectstack-fleet

epic:#26676#1 · zhuangjianguo · session_cdb7a717def74e719988f089fbaa18ff

The maintainer: 「等我决定的都要立卡,并且从业务的角度给我具体解释和我沟通」 (2026-11-04). Measured by the seat on main 63b86b385d, on the example CRM unless noted. No domain:* label is set: triage routes this card.

The question

A sales manager reassigns 40 leads when someone leaves, or moves a batch of deals to a new close date. The bulk bar offers 删除 and nothing else. An author can declare bulkActions per view, but that takes a package change, and each app must build it again.

Governing text: packages/spec/src/ui/view.zod.ts:3577 (bulkActions) and the bulk API operation (packages/spec/src/data/object.zod.ts:53). No ADR rules on a generic bulk edit.

Measured

Selecting one row on 商机 shows 已选择 1 项, 删除, 清除. The example app declares no bulkActions.

Options

  • A. A generic 批量修改 for fields the reader may edit and the object allows, running each row through validation, with a per-row result.
  • B. Bulk owner change only, the most common case.
  • C. Leave it to bulkActions.

Recommendation: B first, then decide on A

四轴分析

实际业务需求。 离职交接和区域调整时最集中,频率不算天天有,但一次就是几十上百条。今天只能逐条改或导出再导入,代价很高,也容易错。

项目长远合理性。 长远看 A 才是完整能力,但要先定:部分失败怎么呈现、状态机和审批怎么走、审计怎么记。B 把这些问题缩到一个字段先走通,不会白做。

防 AI 写错。 走现有校验和权限,不新增元数据。必须逐条校验,不能为了快绕过规则。

创业阶段不扩散。 B 范围小、价值高。A 现在做范围偏大。

棱 A B C
业务 强 强 弱
长远 强 中 中
防错 中 中 强
不扩散 弱 强 强

Not measured

Whether ownership transfer already has a bulk server path. The transfer gate exists per ADR-0142; a bulk route was not read.

Re-check

git grep -n "bulkActions: z.array" origin/main -- packages/spec/src/ui/view.zod.ts

Activity

  1. added
    needs-user-decisionBlocked on a maintainer decision — do not dispatch; decision cards only, never on a PR
    on Nov 4, 2026
  2. objectstack-fleet commented on Nov 4, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#26676#1 · zhuangjianguo · session_cdb7a717def74e719988f089fbaa18ff

    The maintainer, 2026-11-04: 「30079这种不是应该在元数据应用中自己去开发自定义操作吗?你的意见是批量换负责人放到内核吗?其他全部同意」.

    The seat withdraws its recommendation (B first). Nothing goes into the kernel for this. The maintainer's question was right, and the seat had not measured the metadata route before recommending.

    Measured on main 63b86b385d, on the example CRM, with no code: one list view override in the customization package adding this to the view:

    bulkActionDefs: [{
      name: 'eval_change_owner',
      label: '批量修改负责人',
      operation: 'update',
      confirmText: '把选中的 {{ count }} 条线索转给新负责人?',
      params: [{ name: 'owner_id', label: '新负责人', type: 'lookup', object: 'sys_user', required: true }],
    }]
    Step Result
    Select two leads The bulk bar shows 批量修改负责人
    The dialog A user lookup, then a confirmation listing both records and the new owner
    执行 POST /api/v1/data/crm_lead/updateMany → 200, 成功 2 / 2, with 撤销 offered, and updated_at moved on those two rows only
    • An owner_id reassignment is denied without allowTransfer (packages/spec/src/security/permission.zod.ts:522-530). The seat read this and did not exercise it with a second account.
    • Declaring these defs replaced the default 删除 on that view's bar in this test, so an author who wants both declares both. Whether that is intended was not read in depth.
    • Studio's view panel offers no editor for bulkActionDefs, so today this is authored in metadata, by a developer or an AI. Opening that editor is not proposed here.

    This card stays open with needs-user-decision only until the maintainer confirms closing it as not planned.

  3. removed
    needs-user-decisionBlocked on a maintainer decision — do not dispatch; decision cards only, never on a PR
    on Nov 4, 2026
  4. objectstack-fleet commented on Nov 4, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#26676#1 · zhuangjianguo · session_cdb7a717def74e719988f089fbaa18ff

    The maintainer, 2026-11-04: 「同意你的建议」, answering the seat's proposal to close this card as not planned, with #30089 carrying the need.

    Closed 2026-11-04T13:09Z as not planned. No kernel feature for bulk owner change or bulk edit: a view's bulkActionDefs already provides it in metadata, as measured in the comment above. #30089, ruled A, adds the Studio section that lets a person configure it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions