How Inspection Groups Work
Source: autosoft-workshop/app/controllers/inspection_groups_controller.rb
- Group codes must be unique within a company — duplicate codes are rejected
- Renaming a group code cascades the change to ALL template items and ALL inspection items that reference that group — this is a large-scale silent change with no confirmation prompt
- A group cannot be deleted if it is referenced by any template or existing inspection
- The update action uses a find-or-create pattern: if the submitted ID does not match an existing group, a new group is created instead of failing — this can silently create duplicate groups
Support scenarios
- "I renamed a group and now all my templates changed" → renaming a group code cascades to every template item and inspection item using that group; this is by design but can be surprising
- "I can't delete this inspection group" → it is still referenced by templates or existing inspections; those references must be removed first
- "I have duplicate groups" → the update action creates a new group if the ID does not match; this can happen if group data gets out of sync between the UI and server