Skip to content

base form-questions-delete removes underlying table fields #1174

@Suda202

Description

@Suda202

Summary

lark-cli base +form-questions-delete appears to delete the underlying Base table field(s), not just remove questions from a form view.

Why this seems like a bug

The command help/docs describe this as deleting questions from a form:

  • Create/Delete questions for a form in a Base table
  • Delete questions from a form in a Base table
  • Chinese docs: 从多维表格表单中批量删除问题

That wording suggests the operation is scoped to the form. In practice, the corresponding table field is removed from the Base table. The CLI confirmation also only says base +form-questions-delete requires confirmation; it does not warn that the underlying table column/field and its data may be deleted.

Environment

  • Package: @larksuite/cli
  • Version: 1.0.43
  • Command: lark-cli base +form-questions-delete
  • Identity: --as user

Reproduction

Using a scratch Base/table:

  1. Create a Base table field, for example Assignee or Status.
  2. Create a form view that includes this field as a form question.
  3. Run:
lark-cli base +form-questions-delete \
  --base-token <base_token> \
  --table-id <table_id> \
  --form-id <form_id> \
  --question-ids '["<field_id>"]' \
  --yes \
  --as user
  1. Read back the table fields:
lark-cli base +field-list \
  --base-token <base_token> \
  --table-id <table_id> \
  --as user

Actual behavior

The field no longer appears in the table field list.

In my real run, removing form questions for internal fields such as owner/status/severity also removed the underlying table fields. Views that referenced the deleted field IDs then became invalid and had to be repaired by recreating those fields.

There were no records in that table at the time, so no existing cell data was lost in my case. But on a populated table this could be destructive.

Expected behavior

Either:

  1. Removing/deleting a form question should only remove it from the form view and keep the underlying Base table field intact; or
  2. If the underlying OpenAPI operation necessarily deletes the backing table field, the CLI command name/help/docs/confirmation should make that destructive behavior explicit.

For example, the confirmation text should warn that this deletes the corresponding table field and may affect existing cell data, views, filters, formulas, workflows, and other references.

Suggested improvements

  • Prefer a non-destructive form-question removal/hide behavior if the API supports it.
  • If the operation is inherently destructive, update the docs/help text to say it deletes the backing table field.
  • Consider adding a stronger confirmation message listing the field titles/IDs that will be deleted from the table.
  • Ideally provide a safe command/API path for hiding fields from a form without deleting table fields.

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain/basePR touches the base domain

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions