You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(example-crm): make formula fields compute + allow historical closed deals; bump objectui
Release-prep browser test of example-crm surfaced three "passes build,
silently wrong at runtime" defects:
- Formula fields (`full_name`, `is_closed`, `expected_revenue`) referenced
bare field identifiers (`amount`, `status`, `first_name`). Formula scope
exposes only `{record, previous, input, os}` with no field flattening, so
bare names resolve to nothing and every formula evaluated to null. Rewrite
to `record.<field>`.
- `expected_revenue` additionally divided by the int literal `100`. cel-js
has no `double × int` arithmetic overload, so `<number field> / 100` faults
and the formula returns null. Use the float literal `100.0` (both operands
`double`). The systemic guardrail for this footgun is tracked separately.
- `opp_close_date_not_past` validation fired on every insert, rejecting the
legitimate `closed_won`/`closed_lost` seed rows that carry historical close
dates (5 of 9 wins were dropped, breaking the pipeline dashboard's
"Won This Quarter" KPIs). Scope the rule to open stages only.
Also bumps `.objectui-sha` 26da1a2a3731 → ac2de168d487 and rebuilds the
bundled @objectstack/console dist for the release.
Verified live: opportunities seed 4 → 12; expected_revenue computes
(84000, 180000, …); full_name / is_closed populate.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
description: 'Prevent setting close_date to a date in the past on new records.',
95
+
description: 'Prevent back-dating the close_date of an OPEN opportunity. Closed (won/lost) deals legitimately carry a historical close date, so they are exempt.',
0 commit comments