[Base] Add +form-upgrade shortcut
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 17.3k
- Forks
- 1.4k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 105
Description
Prerequisites
- I searched existing issues and discussions, this is not already proposed.
- This is a concrete, actionable proposal, not a vague wish.
Problem or motivation
The Base domain can create and manage forms (+form-create, +form-update, questions, share, submit) but cannot upgrade a legacy form to the new form version. The platform endpoint exists:
POST /open-apis/bitable/v1/apps/:app_token/tables/:table_id/forms/:form_id/upgrade
Proposed solution
One shortcut:
+form-upgrade --base-token --table-id --form-id --form-name --display-mode(risk: write, scope:base:form:update)
Notes from verifying against a live tenant and the official Go SDK model:
display-modeaccepts exactlytraditionalorone_question_per_page. Anything else fails field validation (99992402).- The response carries only the upgraded form id under
data.form.id(per the SDK'sUpgradeAppTableFormRespData), not a full form object. - Forms already on the new version return
1254128with a clear message, which is also the expected error path in tests. - Honest test limitation: legacy forms can no longer be created through the API, so a live E2E test can cover auth, request shape, and the
1254128error path, but the positive upgrade path can only be exercised on a legacy form created earlier in the UI.
Alternatives considered
Recreate the form from scratch with +form-create and delete the legacy one. That loses share links and any existing responses, so it is not equivalent for a form that is already in use.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing +form-create and +form-update shortcuts and their Base form tests, then trace how they construct requests and validate flags. Done means +form-upgrade accepts the listed options, enforces the documented display modes and write scope, returns the upgraded form id, and covers the 1254128 error path; the positive live upgrade path may require a legacy form created in the UI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100