Asset Record: Last Inspection Date & Comprehensive Data Quality Tracking
Asset Record: Last Inspection Date & Comprehensive Data Quality Tracking
Introduced in v0.13.12
Overview
v0.13.12 completes the Asset Record — Core Field Schema by adding the lastInspectionDate field and upgrading the Outstanding Data Requests tracker to surface gaps across all required core fields — not just missing install dates.
This matters because reserve fund modelling and replacement year projections depend on complete, up-to-date asset data. The tracker now gives portfolio managers a single, consolidated view of every data gap across their asset register.
Last Inspection / Survey Date
What it is
The Last Inspection / Survey Date records when an asset's condition was last formally assessed. It contextualises the condition rating: a condition rating of 3 (Fair) surveyed last month is meaningfully different from the same rating recorded five years ago.
Where it appears
Create Form
A date picker for Last Inspection / Survey Date is included in the asset creation form. If left blank, an amber inline message indicates the field will be flagged for follow-up:
"Missing dates are flagged for follow-up."
Edit Form
The field is also available in the asset edit form. When empty, an amber warning with a ⚠ icon states:
"Required for a complete asset record"
Asset Detail View
The recorded date is displayed with time-since-inspection context:
| Time since inspection | Display |
|---|---|
| Less than 1 year | 12 days ago (neutral) |
| 1–2 years | 1 year ago (amber) |
| 3 or more years | 4 years ago — consider re-survey (red) |
If no date is recorded, the field shows:
"Not recorded — flagged for follow-up" (amber)
Outstanding Data Requests Tracker
What changed
Previously, the tracker only alerted when assets were missing their install date. It has been overhauled to track all core fields defined in the Asset Record — Core Field Schema spec.
Core fields tracked
All fields except Notes are treated as required for a complete asset record:
- Install / Last Replaced Date — essential for projected replacement year calculations
- Estimated Lifespan (years) — required for reserve fund modelling
- Condition Rating (1–5) — drives early replacement flag logic
- Last Inspection / Survey Date — contextualises the condition rating (new in v0.13.12)
- Estimated Replacement Cost — needed for fund contribution calculations
- Compliance Deadline — applies to compliance works asset class
How it looks
When any asset has an incomplete record, an amber panel appears at the top of the Asset Register. Each missing field type is shown as a labelled count badge:
⚠ Outstanding Data: 7 assets with incomplete records
Per spec, all fields except notes are required for a complete asset record.
Incomplete records affect reserve fund modelling and replacement year projections.
[ 📅 3 missing install date ] [ ⏱ 2 missing lifespan ] [ ⭐ 1 missing condition rating ]
[ 📅 4 missing inspection date ] [ 🗄 2 missing replacement cost ]
The tracker is only shown when assetsWithIssuesCount > 0 — meaning any combination of missing core fields will surface it.
Data Quality Summary API
The dataQualitySummary query (on the asset router) now returns missingLastInspectionDateCount in addition to the existing metrics:
type DataQualitySummary = {
assetsWithIssuesCount: number;
missingInstallDateCount: number;
missingLifespanCount: number;
missingConditionRatingCount: number;
missingLastInspectionDateCount: number; // NEW in v0.13.12
missingReplacementCostCount: number;
missingBothDateAndLifespanCount: number;
missingComplianceDeadlineCount: number;
missingInstallDateAssets: { id: string; name: string }[]; // top 10
};
Assets missing a last inspection date are now included in the assetsWithIssues set alongside assets missing other core fields.
Database Schema
A new nullable last_inspection_date column has been added to the assets table:
ALTER TABLE assets ADD COLUMN last_inspection_date TIMESTAMP;
The field is nullable — existing asset records are unaffected and no migration data loss occurs.
Core Field Schema Reference
The following table summarises the complete Asset Record core field schema as of v0.13.12:
| Field | Required | Notes |
|---|---|---|
| Asset Class | ✅ | e.g. building fabric, compliance works |
| Asset Name & Type | ✅ | |
| Install / Last Replaced Date | ✅ | Drives projected replacement year |
| Estimated Lifespan (years) | ✅ | Used in reserve fund modelling |
| Condition Rating (1–5) | ✅ | 1 = Poor, 5 = Excellent |
| Last Inspection / Survey Date | ✅ | Contextualises condition rating |
| Estimated Replacement Cost | ✅ | Drives fund contribution calculations |
| Notes | ❌ Optional | Free-text; only optional field |