Add property county to inspection exports (Reports Hub)

Objective

  • Add property county as persisted data on inspections (inspection.property.county) so it is available for Reports Hub exports, report conditions/filters, and other product surfaces that use property fields.
  • Enable users to include County in custom inspection reports (column picker, preview, and CSV/XLSX export) alongside existing address fields.

Background

  • Finance and ops need inspection rows identifiable by county alongside address and client context in flat exports.
  • County is the net-new gap. Inspection property in attik-backend/src/models/propertySchema.ts stores street, unit, city, state, zip, and related fields but does not persist county. exportFieldDefinitions.ts has no county column on inspections.
  • County already appears in transient sources but is not saved today:
  • Scheduling: Zillow/Bridge parcel lookup returns county and displays it in ZillowPropertyDetails.tsx, but create payloads in NewSchedulingForm.tsx / createInspection.ts do not pass it through.
  • Spectora: Webhook property types include county, but spectoraPropertyToServerProperty.ts does not map it — Spectora sync is out of scope for v1 write paths (see locked decisions).
  • Already available today (not in scope unless product reopens):
  • Full address: address on inspections (legacy field synced from property via generateAddress() in propertySchema.ts / inspectionSchema.ts pre-save).
  • Address components: property.street, property.city, property.state, property.zip in the Reports Hub column picker.
  • Client name: via linked People on an inspections report (firstName, lastName, roleName, filter people:roleName). No dedicated job-level Client Name column without linking People.
  • Feature request: Featurebase — County
  • Child of Reports Hub update for Finance (ATT-1862).

Locked product decisions (v1)

  • Persist county on inspection.property.county — not export-time-only resolution.
  • Write paths in v1: persist county when available on:
  • Scheduling (new jobs and scheduler-driven address updates)
  • Manual property edits on the job
  • Backfill for existing inspections missing county (see below)
  • Not in v1 write paths: Spectora sync — do not map or persist county from Spectora webhooks/sync in this issue.
  • Backfill: populate county on existing inspections where possible (e.g. Bridge/Zillow lookup via fetchBridgeParcel.ts using lat/lng or address). If the effort is large, assignee discusses scope with Ryan/Chris before expanding.
  • Reports Hub: exportable County column on Inspections (picker, preview, CSV/XLSX).
  • Out of scope for v1: job-level clientName computed column; changes to existing full-address / street–zip fields; Spectora county sync.

Done when

  • property.county exists on the schema and is saved on new/updated jobs via scheduling and manual edit paths when county data is present.
  • Backfill executed or explicitly deferred with Ryan/Chris if not feasible in v1.
  • County appears in the Reports Hub column picker for Inspections, works in preview and export, and persists on saved reports.
  • County is available as persisted property data for conditions/filters following the same patterns as other property.* fields.

Scope

Backend

  • attik-backend/src/models/propertySchema.ts — add county to PropertyType / schema.
  • Scheduling create/update: attik-backend/src/util/functions/inspection/createInspection.ts — accept and persist county from address payload.
  • Manual property edit: attik-backend/src/routes/inspection.ts — include property.county in PATCH handling alongside existing property fields.
  • Backfill: batch or script approach using existing Bridge/Zillow utilities (fetchBridgeParcel.ts, frontend callZillowAndMatch.ts patterns) — scope TBD with Ryan/Chris if heavy.
  • Explicitly out of scope: spectoraPropertyToServerProperty.ts and Spectora sync paths — no county mapping in v1.
  • attik-backend/src/config/exportFieldDefinitions.ts — register property.county on inspectionFields with label County.
  • attik-backend/src/util/functions/dataExports/documentResolution.ts — resolve county like other property.* fields.

Frontend

  • Scheduling: pass county from Zillow/Bridge into create/update payloads when present (PropertySection.tsx, NewSchedulingForm.tsx).
  • Manual job edit: surface county on property save if in scope for edit UI (PropertySectionWrapper.tsx).
  • Reports Hub: column picker and preview (CreateReportForm.tsx, ReportPreviewSection.tsx) — surface County when backend field defs expose it.

Out of scope

  • Spectora sync county persistence.
  • Job-level client name computed field (People link covers today).
  • Changes to Full Address / existing property.streetzip fields.
  • Wide service columns (ATT-1856), split date/time (ATT-1863).

References

  • Featurebase — County
  • Reports Hub update for Finance (ATT-1862)
  • Property schema: attik-backend/src/models/propertySchema.ts
  • Export field defs: attik-backend/src/config/exportFieldDefinitions.ts
  • Scheduling create: attik-backend/src/util/functions/inspection/createInspection.ts
  • Manual property PATCH: attik-backend/src/routes/inspection.ts
  • Zillow/Bridge county source: attik-frontend/src/util/functions/fetching/callZillowAndMatch.ts, attik-backend/src/util/functions/zillow/fetchBridgeParcel.ts
  • Spectora (out of scope v1): attik-backend/src/util/functions/spectora/spectoraPropertyToServerProperty.ts

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.