Split inspection date and time into separate Reports Hub columns

Objective

  • Export Inspection Date and Inspection Time as separate columns in Reports Hub on Inspections and Quotes, so finance can filter, sort, and pivot by date and time of day without parsing a combined datetime string in Excel.
  • Provide date-only and time-only values formatted for spreadsheet normalization (consistent, predictable strings per row) — not the current combined YYYY-MM-DD HH:mm export.
  • Keep the existing combined datetime column unchanged for backward compatibility; new columns are additive.

Background

  • Finance feedback (Andy/Erin session, parent epic Reports Hub update for Finance) calls for scheduling columns separate from revenue fields.
  • Erin: when users pick date fields in exports, values download as a timestamp-style datetime (YYYY-MM-DD HH:mm) and must be cleaned up manually before sorting or manipulating in spreadsheets. Andy noted CSV as a workaround; the underlying need is a plain date field (and separate time).
  • Today Inspections expose a single datetime field labeled Inspection Date in exportFieldDefinitions.ts; formatting.ts renders all date types as YYYY-MM-DD HH:mm when company timezone is set (runDataExportJob.tsgetExportTimeZone). There is no date-only or time-only export today.
  • Quotes expose datetime as Requested Date (mapped to createdAt in exportFieldDefinitions.ts) — split date/time applies here too in v1.
  • Template reference (not a separate deliverable): Email/SMS/agreement templates split scheduling via inspectionDate and inspectionTime in templatingData.ts (company timezone). Reports Hub should expose the same semantic split (date column + time column from one instant). Export formats are locked below and happen to match those template formats.
  • Prebuilt Inspection Summary only includes datetime among scheduling fields (prebuiltReports.ts).
  • Consolidated duplicate: ATT-1860 — same deliverable; tracked here.
  • Out of scope: county, client name, address (ATT-1858); End Time split columns (no user ask).

Locked product decisions (v1)

  • Entities: Inspections and Quotes (quote split applies to the scheduling datetime field exposed today — Requested Date / createdAt mapping).
  • Export formats: DateM/D/YYYY; Timeh:mm A (12-hour with AM/PM), in company timezone.
  • Primary goal: Normalization-friendly for spreadsheets — stable string output suitable for downstream imports and pivot workflows (not locale-pretty-only rendering that varies row to row).
  • Backward compatibility: Existing combined datetime column stays as-is (YYYY-MM-DD HH:mm); new date-only and time-only columns are added alongside it.
  • End Time: Out of scope — no split columns for endtime in v1.
  • Template parity (clarified): Semantic — separate date and time from the same scheduling instant, like template variables. Format — locked to M/D/YYYY and h:mm A (same as inspectionDate / inspectionTime in templatingData.ts).

Done when

  • Inspection Date (date-only) and Inspection Time (time-only) appear in the Reports Hub column picker for Inspections and Quotes.
  • Exported values use M/D/YYYY and h:mm A in company timezone; date column never includes time; time column never includes date.
  • Combined datetime column behavior is unchanged on existing saved reports.
  • Users can add the new columns to saved reports, preview them, and export CSV/XLSX.

Scope

Backend

  • attik-backend/src/config/exportFieldDefinitions.ts — register date-only and time-only fields on inspections and quotes (computed from datetime; quotes continue to source from createdAt per existing datetime mapping unless dev chooses clearer field keys).
  • attik-backend/src/util/functions/dataExports/formatting.ts — format new fields as M/D/YYYY / h:mm A via TZDayjs / company timezone; do not reuse formatDateForExport (YYYY-MM-DD HH:mm) for these columns.
  • attik-backend/src/util/functions/dataExports/documentResolution.ts and/or runDataExportJob.ts — resolve split values when columns selected; timezone passthrough same as current date exports.

Frontend

  • Reports Hub column picker and preview (CreateReportForm.tsx, ReportPreviewSection.tsx) — surface new fields when backend exposes them via GET /data-exports/fields/inspections and .../quotes.

Out of scope

  • End Time (endtime) date/time split.
  • Changing or removing the existing combined datetime column.
  • County, client name, address (ATT-1858).
  • Finance prebuilt template updates (optional follow-up after ATT-1856).

References

Please authenticate to join the conversation.

Upvoters
Status

Planned

Board
🏠

Main App

Date

3 days ago

Author

Linear

Subscribe to post

Get notified by email when there are changes.