supportTickets best-practice fields: subject + category + priority + updatedAt (converge to PLUTO-563)
Fleet decision bs-mrtkq6rjomf (2026-07-20, closed pm-venus): converge Mars supportTickets toward PLUTO-563 reference shape. ADD 4 cols (Class-A additive DDL, db-mars lane): (1) subject text nullable — backfill left(body,80)+'…' + a needs-triage flag; report-form gets a subject input. (2) categoryOptionId + (3) priorityOptionId FK->lookupOptions — seed grupos supportTicketCategory / supportTicketPriority, store VALUE-CODE not label per fleet lookup convention, NO native enum, NO CHECK, nullable + backfill 'general'/'normal' (zero NOT NULL break on live rows). (4) updatedAt timestamptz default now() + touch-trigger. UI (coder, after cols land): report-form category+priority pickers + subject input; /administrar/soporte list badges + triage filter. NO gold-plating (skip SLA/tags/watchers/closedAt; assignedAgent->users-FK deferred). GATED on Elazar plan-GO — no db/coder dispatch until GO. Class-A: audit design-ping pre-impl + diff review pre-push.
Questions
Activity
-
Elazar plan-GO 2026-07-20 16:10 (bs-mrtkq6rjomf). Dispatched: db-mars-cc (DDL: subject+categoryOptionId+priorityOptionId+updatedAt, seed lookup grupos supportTicketCategory/supportTicketPriority value-code, backfill general/normal + subject left(body,80); build vSupportTicketFull fleet-standard view reconciling w/ existing vSupportTicket mig-079; Class-A audit pre-apply review) + coder-mars-cc (ratify vSupportTicketFull in fleet registry evolutiva-db-views.md NOW + UI leg subject input/category+priority pickers//administrar/soporte badges+triage filter AFTER cols land, Class-A pre-push diff+PTD). audit-mars-ca heads-up sent.
-
Impl decisions ratified (PM, 2026-07-20): (1) category/priority stored as uuid-FK categoryOptionId/priorityOptionId->lookupOptions(id), NOT value-code-text — matches the existing supportTickets OptionId-uuid family (statusOptionId/visibilityOptionId); seeds carry explicit value codes (category: general/acceso/error/consulta/sugerencia/queja/otro; priority: baja/normal/alta/urgente), view resolves labels. The fleet decision's 'store value-code not label' = don't-store-the-display-label, not abandon-uuid-FK where the table family already uses it. Flagged to pm-venus for cross-app leg alignment (venus also uuid on statusOptionId; pluto may go value-code-text — fine, view output identical). (2) vSupportTicketFull = resolved-header view; vSupportTicket (mig 079) redefined as superset wrapper (SELECT full.*, thread-jsonb) — canonical-wrapper pattern, one header-truth source, SOP-MARS-N recipe preserved. Built as mig 080, rollback-harness green, routed audit-mars-ca pre-apply. fn_set_updatedAt reusable touch-trigger fn added; subjectAutofilled=true marks needs-triage backfilled subjects.
-
CORRECTION to prior event: uuid-FK decision REVERSED to value-code-TEXT. Audit BLOCK:080 P1(a) correctly cited evolutiva-commons §Lookup-Backed ('store the value-code, NEVER the row uuid'; optional FK is to (category,value) NOT id). Matching the existing statusOptionId-uuid was entrenching a pre-existing convention violation; the fleet decision's literal text said 'store value-code'. PM ruling: comply with written standard — category/priority = value-code TEXT columns, FK to lookupOptions(category,value), names per §Lookup-Backed pattern. Audit P2 (REVERT scoped to exact 11 seeded values) + P1(b) (cat/pri joins category-qualified + deletedAt-filtered) already fixed+verified. On revised DDL → audit re-issue → apply. pm-venus notified to reverse their uuid alignment (they'd switched on my earlier flag). Lesson: don't reinterpret a documented convention to match a legacy violation; independent cross-vendor audit citing written standard = follow it.
-
FINAL storage-key ruling (3/3 unanimous PM consensus mars+venus+pluto, 2026-07-20): category/priority = uuid-FK categoryOptionId/priorityOptionId->lookupOptions(id), matching supportTickets' entrenched statusOptionId-uuid family. Supersedes both my earlier flips (uuid->value-code-text->uuid). Decisive point (venus): value-code-text on ONE column of an all-uuid table is a half-measure conforming to neither §Lookup-Backed nor intra-table consistency; true compliance = migrate ALL lookup cols (out-of-scope, risky, live data). Basis: Elazar permits per-app storage divergence (fleet contract = view NAME+LABEL only); mars-ca/venus-ca split on it (judgment call, not forced violation). Disciplines adopted fleet-wide: (a) documented per-app exception logged in mars-commons so uuid doesn't read as rule-permitted + drift; (b) strict §Lookup-Backed compliance deferred to separate convention-migration WI = MARS-546 (pluto=PLUTO-625 exception, parallel). db-mars restores original uuid mig 080 (P2+P1(b) fixes stay) -> documented exception -> audit re-issue (PASSes on documented exception) -> apply.
-
Support-ticket best-practice fields shipped @aa43aeb/v2.52.0. mig 080 added subject+category+priority(value-code TEXT)+updatedAt; UI exposes asunto/categoría on report FAB + prioridad as admin-triage on ticket form + badges/triage-filter on admin list. vSupportTicketFull view. audit PASS:aa43aeb, 0 runtime errors.