API accepts choice options on a question type that has none
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 POST /ocs/v2.php/apps/forms/api/v3/forms/{formId}/questions/{questionId}/options 的 API 路由开始,找到存储选项文本的 controller 方法。阅读问题类型是如何建模的,以及问题现有的类型校验发生在哪里,然后在问题类型不接受任何选择时拒绝创建选项。添加或扩展覆盖 short 问题的 API 测试,并确认它现在返回 400 且没有写入任何行。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
The API accepts choice options on a question type that has no choices. They are stored but never used.
Steps to reproduce
- Create a form with a question of type
short(short text). POST /ocs/v2.php/apps/forms/api/v3/forms/{formId}/questions/{questionId}/optionswith{"optionTexts": ["Coffee", "Tea"]}.
Expected behaviour
400: the question type takes no options.
Actual behaviour
- The form still shows a text field, and the two options are stored as dead rows on the question.
Versions
Forms 5.4.2.
- 主要语言
- JavaScript
- 星标
- 385
- 派生
- 133
- 平均合并
- 7 小时 54 分钟
- 30 天内合并 PR
- 157
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nextcloud/forms 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
0. Needs triage bug
难度 3/5 1-2 天 新手友好度 64/100
维护者通常 1 天内回复
-
1. to develop enhancement
难度 5/5 一周以上 新手友好度 35/100
nextcloud/forms#3841 · 1 个 reaction ·
维护者通常 1 天内回复
-
0. Needs triage bug
难度 3/5 1-2 天 新手友好度 45/100
nextcloud/forms#3831 · 1 条评论 ·
维护者通常 1 天内回复
-
1. to develop enhancement
难度 4/5 3-5 天 新手友好度 22/100
nextcloud/forms#3829 · 1 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
cytoscape/cytoscape.js#3597 ·
维护者通常 5 天内回复
-
priority: low server testing
难度 1/5 1 小时以内 新手友好度 88/100
blamechris/chroxy#9277 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 72/100
sunososobro-hub/cloudball#191 ·
维护者通常 1 天内回复
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)未关闭
难度 2/5 1-3 小时 新手友好度 62/100
microsoft/playwright#44289 ·
维护者通常 1 天内回复
-
area:post effort:low enhancement P7 source:agent
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复