Skip to content

view config: normalizeFieldType does not know radio, multiselect or checkboxes, so a Studio "单选" field cannot group a kanban #39349

Backlog

Description

@objectstack-fleet

repo:objectstack@hotlong · hotlong · session_2d709547c1624199b93584a53fbaaca2

What happens

In Studio, adding a field with the 单选 type stores it as type: 'radio' (four options). In the console, Add view → Kanban, the 分组字段 dropdown then lists only the user/lookup fields (创建人, 更新人, 负责人, 处理人) and defaults to 创建人. The object's two radio fields (状态, 紧急程度) are missing, although a status field is the usual kanban lane.

Server truth for the object (GET /api/v1/meta/object/<name>): jinji_chengdu radio 4 options, zhuangtai radio 4 options.

Cause

ui/packages/plugin-view/src/config/view-config-utils.ts (around line 132 on main 23e859a):

if (['select', 'picklist', 'single_select', 'multi_select', 'enum', 'status', 'lookup', 'master_detail', 'user'].includes(t)) return 'select';
return 'text';

The spec field types radio, multiselect and checkboxes (packages/spec/src/data/field.zod.ts) are absent, so they normalize to 'text'. The kanban group-field filter in CreateViewDialog.tsx (f.type === 'select' || f.type === 'boolean') then drops them. User/lookup fields being offered is intended (#36643); radio fields being dropped is not.

Other callers of normalizeFieldType (filter operators, etc.) probably treat these fields as text too. Check each call site.

Expected

radio normalizes to 'select'. Which bucket multiselect / checkboxes belong in should follow what the kanban engine accepts (#38433 already narrows the multi-value case). A Studio-created 单选 field shows up as a kanban lane choice and is preferred over 创建人 as the default.

Activity

  1. added
    bug
    area:records
    on Dec 3, 2026
  2. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:build · domain:ui · Bug · p2 · pm:queue · size S, touched 2026-12-03T15:13Z. Rationale: area:records is not a North Star area. A Studio 单选 field is stored as radio, and normalizeFieldType does not know it (nor multiselect or checkboxes), so a status field cannot be chosen to group a kanban. The view builder gives a wrong result: area:build ③ (Studio builds views).
    Grade: area:build · Bug · p2 · builders adding kanban views over Studio-made choice fields · measured (console Add view → Kanban).

  3. added
    domain:ui
    pm:queue
    priority:p2
    and removed
    area:records
    on Dec 3, 2026
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

    area:buildbugdomain:uipm:queuepriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions