Scenario (HotCRM, console pinned in @objectstack/console 17.0.0-rc.5)
HotCRM's opportunity pipeline kanban groups by stage. The object declares:
win_reason: Field.select({
requiredWhen: P`has(record.stage) && record.stage == "closed_won"`,
...
})
Dragging a card into the Closed Won column PATCHes {stage: 'closed_won'} alone. The engine correctly refuses (ValidationError: Win Reason不能为空), so the move can never succeed from the board — the only way to close a deal is to abandon the board and open the record form.
Observed
Expected
On a rejected drop — or better, before PATCHing, by evaluating the target column's requiredWhen fields against the record — open a small dialog collecting the now-required fields (here: Win Reason), then submit stage + collected fields together. This is the same contract the record form already honours; the board should not be a dead end for transitions the metadata explicitly supports.
Repro
- Boot HotCRM main (
333259a4), open Opportunities → 销售流水线 (pipeline_kanban).
- Drag any open deal into 成交 (Closed Won).
- Server log:
Update operation failed … Win Reason不能为空; board shows no prompt; refresh reverts the card.
Related: #4138 (rollback on rejected drag), objectstack#7525 (statusCode-carrying refusals leak as 500).
Scenario (HotCRM, console pinned in @objectstack/console 17.0.0-rc.5)
HotCRM's opportunity pipeline kanban groups by
stage. The object declares:Dragging a card into the Closed Won column PATCHes
{stage: 'closed_won'}alone. The engine correctly refuses (ValidationError: Win Reason不能为空), so the move can never succeed from the board — the only way to close a deal is to abandon the board and open the record form.Observed
Expected
On a rejected drop — or better, before PATCHing, by evaluating the target column's
requiredWhenfields against the record — open a small dialog collecting the now-required fields (here: Win Reason), then submit stage + collected fields together. This is the same contract the record form already honours; the board should not be a dead end for transitions the metadata explicitly supports.Repro
333259a4), open Opportunities → 销售流水线 (pipeline_kanban).Update operation failed … Win Reason不能为空; board shows no prompt; refresh reverts the card.Related: #4138 (rollback on rejected drag), objectstack#7525 (statusCode-carrying refusals leak as 500).