bug(base): 旧版分享表单显隐条件的比较值为空,原始 OpenAPI 可复现

Open
#2,917 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
18/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
go
Domain
api, cli

Research direction

Start with the base +form-detail command and the /open-apis/base/v3/bases/tables/forms/detail response, comparing the value arrays of contains, isNot and doesNotContain conditions against the web UI. Check how base +form-questions-list handles legacy forms, since it returns error 800010523. Done means either a confirmed upstream limitation with a documented workaround, or a CLI change that returns the full option values for legacy forms. The thread has no maintainer decision yet, so confirm the expected behaviour before editing.

Written by the indexing model from the issue text.

Description

bug domain/auth domain/base

问题

读取旧版飞书多维表格分享表单时,lark-cli base +form-detail 返回题目的显隐条件,但部分选项比较值被返回为 []。同一表单在网页中会按实际选项正确显示或隐藏字段。服务端需要读取完整规则,以便让显示、必填校验和提交字段保持一致。

复现

在一张已有的旧版分享表单中设置依赖选项值的显示条件。例如,只有「交付格式」为两种视频格式之一时显示「时长」,「需求类型」为某选项时隐藏「版本」。以下命令中的标识均为占位符。

lark-cli base +form-detail --share-token '<REDACTED>' --as bot
lark-cli api POST /open-apis/base/v3/bases/tables/forms/detail \
  --as bot --data '{"share_token":"<REDACTED>"}'

使用 lark-cli v1.0.99 在飞书复现。对原始 OpenAPI 使用用户身份和机器人身份,相关条件的比较值都为空。实际响应的脱敏节选如下(仅保留相关条件)。

{
  "title": "时长",
  "filter": {
    "conjunction": "and",
    "conditions": [
      {"field_name": "交付格式", "operator": "contains", "value": []},
      {"field_name": "需求类型", "operator": "isNot", "value": []},
      {"field_name": "业务场景", "operator": "isNot", "value": ["试玩"]}
    ]
  }
}

「版本」的条件也出现同样问题,多个 isNot / doesNotContain 条件的 value 为 []。对同一表单尝试 base +form-questions-list 时,接口返回 800010523,提示 The /forms endpoint only supports new forms.。相关背景见 #1041 和 #1891。

想确认

  1. 旧版表单的 forms/detail 返回空比较值是已知限制还是接口问题?
  2. 对已有旧版表单,有没有受支持的服务端 API 或 CLI 路径,能用应用身份读取完整的显隐规则(包括选项 ID 或选项名称),无需依赖已登录的网页?
Dominant language
Go
Stars
18.2k
Forks
1.4k
Avg merge
1d 3h
Merged PRs (30d)
18

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from larksuite/cli

All issues in larksuite/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.