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 in src/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 when reorderFrom is present.

References

  • attik-frontend/src/app/tools/schedule/page.tsx
  • attik-frontend/src/app/tools/inspections/[id]/components/InspectionWorkorderShell.tsx

Please authenticate to join the conversation.

Upvoters
Status

Planned

Board
🏠

Main App

Date

About 1 month ago

Author

Linear

Subscribe to post

Get notified by email when there are changes.