intent: calculatedForCreate runs no calculated actions - create-time checks and duplicate warnings miss every action-derived field
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by reading the generated repository implementation of calculatedForCreate and calculatedForUpdate, then trace how save() applies calculatedActionOnCreate and calculatedActionOnUpdate. Add an integration test for an action-derived field covered by duplicate or requiredWhen; it should verify that omitting the field produces the same check result as submitting it. Done when create and update checks see the values that will be stored.
由索引模型根据 Issue 内容生成。
描述
What happens
The generated controller runs a record's checks: (including the soft duplicate warn tier) on repository.calculatedForCreate(entity), the "record this create would store". For an entity whose fields are derived by calculatedActionOnCreate, that copy is the SUBMITTED record unchanged: the generated calculatedForCreate returns submitted (seen on 14.95.0 in BusinessIntents' PurchaseCreditNoteRepository), while the actions run only later inside save() (entity.Supplier = Beans.get(NoteSupplierAction.class).calculate(entity)).
So on create, every check that reads an action-derived field reads the client's value (or null) instead of the value that will be stored. In BusinessIntents/base-purchase-invoices#39 a supplier note's Supplier is derived from its bill by an action; the duplicate: [Supplier, supplierNumber] warning is therefore never asked for a REST create that omits Supplier, although the stored row carries it. The update path (calculatedForUpdate) has the same question.
Fix wanted
calculatedForCreate/calculatedForUpdateapply the entity'scalculatedActionOnCreate/calculatedActionOnUpdatefields (in declaration order, after the expression fields they may read), so the checks see exactly whatsave()will store.- An IT: an entity with an action-derived field and a
duplicate/requiredWhenover it - a create that omits the field is refused / asked exactly as one that sends it.
Downstream: BusinessIntents/base-purchase-invoices#39.
- 主要语言
- Java
- 星标
- 278
- 派生
- 97
- 平均合并
- 16 小时 46 分钟
- 30 天内合并 PR
- 265
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
eclipse-dirigible/dirigible 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 80/100
eclipse-dirigible/dirigible#7958 ·
维护者通常 1 天内回复
-
intent: a create-from without fromStatus answers 200 on a missing or unknown source id (no 400/404)未关闭
难度 2/5 1-3 小时 新手友好度 78/100
eclipse-dirigible/dirigible#7945 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
eclipse-dirigible/dirigible#7891 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
eclipse-dirigible/dirigible#6538 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
eclipse-dirigible/dirigible#4812 ·
维护者通常 1 天内回复
查看 eclipse-dirigible/dirigible 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 85/100
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefix可能已有人在做 @ItsDeadlyProgrammer 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
appsmithorg/appsmith#42471 · 1 条评论 ·
维护者通常 2 天内回复
-
code-maintenance
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
-
bug priority: medium Review effort [1-5]: 3 status: needs-triage type: bug
难度 2/5 1-3 小时 新手友好度 82/100
carlos-emr/carlos#5258 ·
维护者通常 1 天内回复