Event Triggers
When auto-dispatch is enabled, the system automatically responds to activity lifecycle events — no manual intervention needed. This page explains what triggers a dispatch cycle and how the system reacts.
What Triggers Dispatch
| Event | What Happens |
|---|---|
| Ticket created (To Do, no assignee) | Ticket is enqueued and a dispatch cycle runs |
| Ticket completed (status → closed) | Shuttle position updated, capacity freed, linked successor enqueued if eligible, dispatch cycle runs |
| Ticket started (To Do → In-Progress) | Ticket removed from dispatch queue (no longer eligible) |
| Ticket deleted | Ticket removed from queue, shuttle capacity freed, linked successor enqueued if eligible |
| Shuttle goes on-duty | Dispatch cycle runs (new shuttle available) |
| Shuttle goes off-duty | Unstarted (To Do) tickets re-queued, in-progress tickets stay, dispatch cycle runs |
| Manual reassignment | Old shuttle's count decremented, new shuttle's count incremented, ticket removed from queue |
| Dispatch disabled | Queue purged, all queued and unassignable flags cleared, no further auto-dispatch activity |
| Dispatch re-enabled | Queue rebuilt by scanning current activities, urgency scores recomputed, dispatch cycle runs |
| Dispatch settings saved | Dispatch cycle runs immediately so new weights/limits apply to queued items (already-assigned tickets unaffected) |
Ticket Creation
When a new ticket is created with status To Do and no assignee:
- The system checks if the ticket is blocked by a linked predecessor
- If not blocked, the ticket is added to the dispatch queue with a computed urgency score
- A dispatch cycle runs immediately to try to assign it
Not enqueued:
- Tickets created with status
inprogress,problem, orclosed - Tickets created with an assignee already set
- Tickets whose linked predecessor is not yet closed
Ticket Completion
When a ticket is closed:
- The assigned shuttle's position is updated to the ticket's destination coordinates
- The shuttle's active ticket count is decremented (freeing capacity)
- If the ticket has a linked successor that is To Do, unassigned, and not blocked, the successor is automatically enqueued
- A dispatch cycle runs — the freed shuttle and any newly enqueued successor are considered
Off-Duty Behavior
When a shuttle goes off-duty:
- To Do tickets are unassigned, their dispatch status set to "queued", and they are re-enqueued for other shuttles
- In-progress tickets remain assigned — the shuttle should complete work they've already started or release tickets back to To Do
- A
shuttle_status_changeevent is published with a summary of re-queued tickets
Linked Move Unblocking
Linked moves are automatically handled by the dispatch system:
- Predecessor ticket closes → system checks the successor
- If successor is To Do, has no assignee, and has no other unclosed predecessor → successor is enqueued
- Dispatch cycle runs to assign the successor
This means a chain like A → B → C will be dispatched incrementally: A is assigned first, then B becomes eligible when A closes, then C when B closes.
The Dispatch Queue panel on the Dispatch screen is the canonical view for tickets that haven't been assigned yet. Rows are returned sorted by priority (most urgent first) and hovering shows the 0–100 priority score — see Seeing the Priority Score. You don't need to watch for "no match" notifications — anything sitting in the queue is, by definition, waiting for an eligible shuttle.