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

How Inspection Email and Finalization Rules Work

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

  • Emailing an inspection report requires ALL green/yellow/red (GYR) items to be filled in — if even one item is missing a GYR value, the entire email is blocked
  • The error message when email is blocked does not say which specific item is unfilled — support may need to help the customer check each item manually
  • Only items marked as needs_attention_soon (yellow) or needs_attention_urgent (red) are shown to the customer for approval — green items are hidden from the approval view
  • Finalizing an inspection has the same requirement: all GYR items must be filled in before finalization is allowed
  • BUG: The finalize action uses assignment (=) instead of comparison (==) when checking request_closed_on — this means request_closed_on is ALWAYS set to the current date regardless of the condition, which is incorrect behavior
  • Finalization sets status to "finalized", sets finalized_on to today's date, and changes the linked invoice's job_status to "wip" (work in progress)
  • The customer activity log has a typo: "Inpsection" instead of "Inspection" — searching the activity log for "Inspection" will not find these entries

Support scenarios

  • "I can't email the inspection report" → at least one GYR item is not filled in; customer needs to check every item on the inspection
  • "The customer can't see all the items on their approval page" → only yellow and red items appear for customer approval; green items are intentionally hidden
  • "I can't finalize the inspection" → same as email — all GYR items must have a value before finalization is allowed
  • "The request_closed_on date is wrong" → known bug where the finalize code always overwrites this date due to an assignment instead of comparison
  • "I can't find the inspection in the activity log" → the log entry is misspelled as "Inpsection" — search for that instead