Show source job on reordered inspections
Objective
- Persist and display a source job / created-from inspection id when a team uses Reorder job so revisits can be traced without guessing.
Background
- Reorder navigates to
/schedule?reorderFrom=<inspectionId>(InspectionWorkorderShell.tsx,WorkorderActionsDropdown.tsx), preloading context insrc/app/tools/schedule/page.tsx. - Apr 29 transcript: teams also want this provenance available for worklists / automations, not only the work order header.
- Decision needed: exact schema field name (
_reorderSourceInspectionId,_createdFromInspectionId, etc.), immutability rules, and whether to backfill older jobs.
Scope
Frontend (attik-frontend)
- Booking confirmation path triggered by
reorderFrom— pass source id into create/PATCH payloads. - Work order chrome — readable link/chip to open the originating inspection.
- Worklist condition builder (
attik-backend/src/routes/worklist.ts, frontend conditions) — expose the new attribute once stored.
Backend (attik-backend)
src/models/inspectionSchema.ts— add foreign-key style field + indexes as needed.src/util/functions/inspection/createInspection.ts(and quote→job promotion paths) — populate whenreorderFromis present.
References
attik-frontend/src/app/tools/schedule/page.tsxattik-frontend/src/app/tools/inspections/[id]/components/InspectionWorkorderShell.tsx
Status: Planned
Log in to comment and vote
No comments yet
Be the first to share your thoughts.