Changing states & closing an occurrence (Staff workflow)
Municipalities can configure custom workflow states and permitted transitions.
What “state” means
The workflow state is a municipality-defined label describing where an occurrence is in its lifecycle. Examples: - Received - Under review - Scheduled - Resolved - Closed
Allowed transitions
You can only move an occurrence to an allowed next state. This prevents accidental “skips” and keeps reporting consistent.
Some transitions can be restricted to certain staff roles.
What happens when you transition a state
When you transition:
- workflow_state is updated
- the public status is synchronized with the state’s group (open/in_progress/resolved/closed)
- first-response time is recorded (for SLAs) if it’s the first staff action
- auto-response templates may trigger (if configured)
Closure checklist
Before closing: - Confirm the issue is resolved in the field/system. - Add a final public update if appropriate. - Transition to the configured resolved/closed state.
Behind the scenes (grounded in code)
- State models:
OccurrenceState,OccurrenceStateTransition - Transition endpoint:
OccurrenceViewSet.transition_state(inapps/occurrences/views.py) - Transition validation:
WorkflowPolicyService.validate_state_transition