Skip to content
English
  • There are no suggestions because the search field is empty.

How Inspection Lifecycle and Status Management Works

Source: autosoft-workshop/app/controllers/inspections_controller.rb, inspection.rb

  • Session validation is skipped for customer-facing inspection endpoints — customers do not need to log in, access is token-based
  • The mobile index endpoint only returns Draft inspections — finalized inspections are invisible on the mobile app
  • Only draft inspections can be deleted; finalized inspections cannot be deleted and must be voided instead
  • Void is blocked for draft inspections — the system forces you to delete a draft rather than void it
  • Voiding an inspection cascades to all child items within a single database transaction — partial voids cannot happen
  • Saving an inspection on mobile enforces draft-only editing — finalized inspections cannot be modified from mobile
  • The default query scope excludes both deleted AND voided inspections — they will not appear in any standard listing
  • Inspections belong to unscoped customers and vehicles, meaning they can reference archived customers/vehicles that no longer appear in normal searches

Support scenarios

  • "I can't find the inspection on my mobile app" → if the inspection has been finalized, it will not appear in the mobile list — only drafts show on mobile
  • "I can't delete this inspection" → it has been finalized; the customer needs to void it instead
  • "I tried to void the inspection but it won't let me" → the inspection is still in draft status; they need to delete it, not void it
  • "The voided inspection still shows some items" → voiding cascades to all items in one transaction, so if any items remain visible the void did not complete — check for errors
  • "The inspection references a customer we archived" → inspections intentionally link to unscoped customers/vehicles, so archived records still appear on existing inspections