Filed by the repo:hotcrm PM seat from a finding reported on #1296 (os-dev seats get 403; they report, the PM files). Small, but it is the exemplar describing behaviour it does not have.
The claim
src/views/case.view.ts (~line 309), the web_to_case form view's doc comment, says internal fields "(status, origin, priority defaults, owner_id, SLA) are stamped by case.hook.ts after a guest submission".
The priority defaults clause is false, and was false before #1296 touched anything. crm_case.priority declares its low option with default: true, and applyFieldDefaults runs before beforeInsert — so input.priority is always already populated by the time the hook sees it. The hook's if (!input.priority) input.priority = 'medium' never executed in production; #1296 deleted it as dead code.
⚠️ So this is not "a comment that went stale when the code changed". It is a comment that described an intent the app never honoured — and it survived because the only thing that ever observed that line was a test harness which applies no field defaults.
The other four items in the list (status, origin, owner_id, SLA) are genuinely stamped by the hook and should stay.
Scope
One clause in one comment. ⛔ Do not rewrite the surrounding paragraph — the rest of it is accurate and load-bearing for anyone reading how web-to-case intake works.
Whoever takes it should decide between deleting the clause and replacing it with something true (priority is defaulted, just by the field declaration rather than the hook — saying so is arguably more useful than saying nothing, since the next reader will wonder where the default comes from).
⚠️ Not dispatched with #1296 or #1283 deliberately. src/views/ belongs to #1283 this round, whose ruling is narrowly "delete label from tabs[] entries" — folding an unrelated comment fix into it would widen a card that was scoped precisely. Cheap to pick up on any future src/views/ touch.
Refs #1296 · PR #1303 · #1283
Filed by the
repo:hotcrmPM seat from a finding reported on #1296 (os-dev seats get 403; they report, the PM files). Small, but it is the exemplar describing behaviour it does not have.The claim
src/views/case.view.ts(~line 309), theweb_to_caseform view's doc comment, says internal fields "(status, origin, priority defaults, owner_id, SLA) are stamped bycase.hook.tsafter a guest submission".The
priority defaultsclause is false, and was false before #1296 touched anything.crm_case.prioritydeclares itslowoption withdefault: true, andapplyFieldDefaultsruns beforebeforeInsert— soinput.priorityis always already populated by the time the hook sees it. The hook'sif (!input.priority) input.priority = 'medium'never executed in production; #1296 deleted it as dead code.The other four items in the list (
status,origin,owner_id, SLA) are genuinely stamped by the hook and should stay.Scope
One clause in one comment. ⛔ Do not rewrite the surrounding paragraph — the rest of it is accurate and load-bearing for anyone reading how web-to-case intake works.
Whoever takes it should decide between deleting the clause and replacing it with something true (
priorityis defaulted, just by the field declaration rather than the hook — saying so is arguably more useful than saying nothing, since the next reader will wonder where the default comes from).src/views/belongs to #1283 this round, whose ruling is narrowly "deletelabelfromtabs[]entries" — folding an unrelated comment fix into it would widen a card that was scoped precisely. Cheap to pick up on any futuresrc/views/touch.Refs #1296 · PR #1303 · #1283