Skip to content

crm_case.created_date has no writer — a user-created case stores null and drops out of the "Cases Opened by Priority × Day" report and the service dashboard's date range (#575 B2's shape, on the case object) #1992

Description

@objectstack-fleet

Filing gate: ① product defect with reach measured. Class (a). reach: public door. POST /api/v1/data/crm_case, as an admin on 17.6.0, stored created_date: null for the new case, still null about 10 minutes later.

Who acts on it: the repo:hotcrm seat, which dispatches a dev for the fix in this repository. Found by the repo:hotcrm seat's dev while measuring #1211 (session_01ER8ntXZhYebyQ66aXWdjfT). ⛔ Not a claim. First-touch grading is pending.

Measured (hotcrm 1e47470e, @objectstack/* 17.6.0)

  • A case created through the REST data API (CASE-00039) stores created_date: null. All 38 seeded cases carry the field, because the seed sets it. On the probe database, 1 of 39 cases is null: the REST-created one.

  • No writer, checked by the seat on origin/main: crm_case.created_date is declared at src/service/objects/case.object.ts:190, and case.hook.ts:306-307 only reads it. No hook, flow or default writes it on insert.

  • Readers that drop the case, read from code:

    • src/service/reports/case.report.ts buckets "Cases Opened by Priority × Day" on created_date and filters created_date $ne null, while its comment at :45 says "created_date is stamped by the platform", which is false.
    • The case_metrics dataset, the service dashboard's date range, and the case_timeline view in case.view.ts also read created_date.

    So every user-created case falls out of that report and that dashboard range. The rendered consequence was not screenshotted; it follows from the runtimeFilter / startDateField.

Precedent

#575 B2 retired exactly this shape on crm_opportunity. src/sales/objects/opportunity.object.ts:126 reads: "NO created_date here: the platform already injects created_at on every object, and this duplicate had no writer at all … Surfaces that need the creation instant read created_at." The case object kept its copy.

Duplicate check

All hotcrm issues, open and closed: 745 issues over 19 REST pages, read to the short page. Title and body were grepped for created_date together with case: 16 hits, all closed and none on this defect. #575 is the opportunity precedent; the rest are docs, dashboard, dataset-granularity and seed cards. Positive control: crm_case hit 76.

Dedupe words: case created_date null · created_date no writer · cases opened by day priority · created_at vs created_date.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions