Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

[console 17.0.0-rc.0] Action params dialog: lookup param always renders 'no reference object configured' helpText even when reference is set and the picker works #3094

Closed

Description

@baozhoutao

Summary

In the record-header action params dialog (RecordDetailView), a lookup-type action param renders the warning helpText "该参数未配置引用对象,无法使用记录选择器。请直接填写记录 ID,或联系管理员修正该动作参数。" (actionDialog.lookupHelpText) unconditionally — even when reference IS configured and the record selector works perfectly.

Repro (17.0.0-rc.0)

Object action with an inline lookup param, canonical spelling per ActionParamSchema:

{
  name: 'set_manager', label: '设置管理责任人', mode: 'custom',
  locations: ['record_header'], type: 'api', method: 'POST',
  target: '/api/v1/ts/record-action/<object>', recordIdParam: 'recordId',
  params: [{ name: 'manager', label: '管理责任人', type: 'lookup', reference: 'sys_user', required: true }],
}

Open the action from a record detail page → params dialog shows the lookup control (search input + grid-picker button):

  • ✅ Grid button opens a fully functional record selector (queries sys_user, search filter works, row click selects and fills the chip);
  • ❌ Below the control, actionDialog.lookupHelpText ("param has no reference object, selector unusable, paste a raw record id") is displayed anyway.

Same behavior with the field-reference param style ({ field: 'manager', required: true }).

Root cause (from the shipped asset)

In the dialog's param renderer (RecordDetailView chunk), the helpText branch is:

u && !t.helpText && jsx('p', { children: n('actionDialog.lookupHelpText') })
// u = t.type === 'lookup' || t.type === 'reference'

i.e. the message claiming "reference not configured" is gated only on "param is a lookup and has no custom helpText" — it never checks whether referenceTo resolved. The degradation check that the message describes lives elsewhere (zt(): Rt.has(type) && !e.referenceTo → type='text') and is not part of this condition.

Expected

Show lookupHelpText only when the param actually degraded to the raw-id text input (i.e. referenceTo missing), mirroring the lookupPlaceholder branch which already checks a.type === 'text'.

Impact

Every record-header action with a lookup param permanently displays a scary red-herring telling users the picker is broken and to paste raw record ids; users don't discover the (working) grid picker. Registered on our side as PLAT-DEF-027.

Workaround

Setting a custom helpText on the param suppresses the misreport (the condition includes !t.helpText).

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions