Lifecycles
Every state a trip, stop, task, shift or work order can hold, and exactly what moves it to the next one.
Most objects in Cooriroo hold a status, and that status can only move along a fixed set of paths. Knowing those paths answers the two questions operators ask most: why a button is not there, and what has to be true before it appears. Everything below is the full set — if a transition is not listed, the product refuses it.
Trip
| Status | What it means | Can move to |
|---|---|---|
| draft | Being built. Not yet real work | scheduled, cancelled |
| scheduled | Has a start time, no driver committed | assigned, cancelled |
| assigned | A driver is committed to it | en_route, cancelled |
| en_route | Started and running | paused, completed, failed |
| paused | Temporarily halted, still live | en_route, failed, cancelled |
| completed | Every stop finished | archived |
| cancelled | Called off before or during the run | archived |
| failed | Started but could not be finished | archived |
| archived | Filed away. Nothing further | Nothing |
Each of those moves has a condition attached. Scheduling needs a scheduled start time. Assigning needs a driver, and needs a vehicle and an origin unless your tenant has made them optional. Starting re-checks the driver and the vehicle, and refuses a vehicle that is not active unless you force it and say why. Pausing, cancelling and failing each need a reason in writing — a pause reason must be one of break, vehicle_issue, weather, dispatch_hold or other.
Stop
| Status | What it means | Can move to |
|---|---|---|
| pending | Waiting its turn | en_route, skipped, cancelled |
| en_route | The driver is heading there | approaching, arrived, skipped, failed |
| approaching | Inside the approach radius | arrived, skipped |
| arrived | On site, work not started | servicing, skipped |
| servicing | Tasks are being worked | departed, failed |
| departed | Served and left | Nothing |
| skipped | Deliberately passed over | Nothing |
| failed | Attempted and could not be served | Nothing |
| cancelled | Removed from the itinerary | Nothing |
Departing is the gated one. Before a stop can be departed, any optional tasks still open are skipped for you, and the required ones are checked; an outstanding required task blocks departure and is named in the error. Skipping and failing both need a reason, and a stop marked required can only be skipped by an admin. Departing also advances the next stop and triggers a route recalculation over what is left.
Task
| Status | What it means | Can move to |
|---|---|---|
| pending | Not started | in_progress, skipped |
| in_progress | Being worked now | completed, failed |
| completed | Done, with proof if proof was required | Nothing |
| skipped | Passed over. Only ever an optional task | Nothing |
| failed | Attempted and could not be done | in_progress, to retry |
There is no shortcut from pending to completed — a task has to be started before it can be finished, so the timestamps mean something. Completing checks two things: every required checklist item is ticked, and every required proof is captured or waived. Failing needs an outcome written against it. A task marked required cannot be skipped at all, and where a stop enforces task order, a task cannot start while an earlier one is unresolved.
Shift
| Status | What it means | How it gets there |
|---|---|---|
| scheduled | Planned, not yet started | Created with a start and end, or from a template |
| active | The driver is clocked on | Clock in, or an ad-hoc shift created on the spot |
| completed | Clocked off, hours totalled | Clock out |
| missed | Never started. A no-show | Automatically, once the grace period passes |
| cancelled | Called off. Will not be worked | Carried by the model; delete a scheduled shift instead |
A scheduled shift is the only kind you can edit — once it is active, its times are a record of what happened rather than a plan. An ad-hoc shift skips the scheduled state entirely and starts active. Clocking out totals the shift: elapsed minutes, break minutes deducted, and anything over your overtime threshold flagged as overtime. Breaks are separate rows inside an active shift, and an open break is why a driver reads as on break rather than available. To call off a shift that has not started, delete it — only a scheduled shift can be removed.
Work order
A work order moves through open, assigned, in_progress, on_hold, completed and closed. Unlike a trip it is not a strict chain — you can put one on hold and pick it up again — but completed and closed are hard stops: a work order in either state refuses any further edit or status change. Moving to in_progress stamps a start time, and closing stamps a close time. Every status change writes a maintenance log entry, so the history is not something anyone has to maintain by hand.
Inspections sit slightly outside all of this: an inspection is a result rather than a process, recorded as passed, failed or passed_with_defects. What gives it a lifecycle is the work it raises — a defect logged as major or critical opens a work order against the vehicle automatically and links the two, so the finding and its fix stay attached. See Inspections for how that plays out day to day.