The loop
Every transition writes an entry in the component’s history, recording who moved it, when,
and any comment.
Where the manual loop begins and ends
MOUNTED and the initial DISMOUNTED are not manual transitions. They are set by the
daily vehicle_configurations import, which is what
knows whether a component is fitted.
So the loop is entered when an import dismounts a component, and it ends at IN_STORE, which
has no manual successor. The component returns to service only when a later import mounts it
again. SCRAPPED is terminal.
Location
current_location answers “where is this thing right now”, and it is set from two directions:
- Send to supplier and receive in stock set it to whatever location you supply.
- Mount and dismount imports set it to the vehicle number when fitted and the depot when dismounted.
Receive at supplier, send back and scrap leave it unchanged, so a component
UNDER_REPAIR continues to show the supplier recorded when it was sent.
Location is optional on the two actions that set it, and omitting it clears the field
rather than preserving the previous value. If you want to keep a location, re-enter it.
Field reference
component_status_update, component_comment and component_attachment. The status
itself lives on assets_component.