FRA — Fire Risk Assessment

Part of the user manual. Related: WORKFLOWS · SCHEDULER · DASHBOARD · PERMISSIONS · ROLES.

FRA = Fire Risk Assessment. A specialised workflow flavour in REBIM, used by installs (typically housing or estate management) that need to track recurring fire risk assessments per property + report on compliance status across their portfolio.

FRA isn't a separate subsystem — it's a flag applied to workflow definitions, with a small amount of dedicated dashboard surface + baked monthly reports. Most of FRA behaves like any other workflow; this page covers what's different.


TL;DR

  • A workflow definition with is_fra=True is an FRA workflow. Its events are counted into FRA reports + appear on the FRA dashboard.
  • The daily cron (see SCHEDULER § The daily cron + lookahead window) computes monthly WorkflowFraReport rows per project — total / complete / overdue counts.
  • The FRA dashboard (visible if UserProfile.show_fra=True) surfaces three views: an overview by month, a per-site table, and the full FRA events list.
  • A WorkflowStatus with exclude_from_fra_baked_reports=True excludes events in that status from FRA snapshots — used for in-flight statuses that aren't worth a point-in-time count.

The is_fra flag on workflows

WorkflowWorkflow.is_fra=True marks a workflow definition as an FRA workflow. Effects:

  • Counted in FRA reports. The cron's fra_report pass tallies per-project totals of events whose workflow_workflow.is_fra=True.
  • Surfaces on the FRA dashboard. The "FRA All" view is the All-Workflows table pre-filtered to is_fra=True.
  • Otherwise normal. The workflow still has its own statuses + transitions + roles. The is_fra flag is purely classification — it doesn't change behaviour, only reporting + visibility surfaces.

Set the flag in the admin panel when creating / editing the workflow definition. Tenancy-aware: an FRA workflow lives in a specific tenancy and its events are scoped to projects in that tenancy.


WorkflowFraReport — the baked snapshots

WorkflowFraReport rows are monthly summaries per project:

Field Purpose
month, year The calendar month this snapshot covers
project (FK) The project
total_count Total FRA events on the project this month
complete_count How many of those are workflow_complete=True
overdue_count How many are NOT complete AND past their due_date

The cron upserts one row per (project, month, year) on each daily pass — same row is updated until the month ends. So month/year identify the snapshot's bucket; created/modified show when the row was last refreshed.

Status filter: events in any WorkflowStatus with exclude_from_fra_baked_reports=True are excluded from the counts.

Manual refresh

The dashboard's FRA tab has a Refresh button (refreshFraReportsBtn → refresh_fra_reports()). It triggers the same fra_report pass synchronously, refreshing the current month's row without waiting for the next cron pass.

Use after a bulk event update if you want the dashboard to reflect the change immediately.


exclude_from_fra_baked_reports (per-status)

WorkflowStatus.exclude_from_fra_baked_reports=True on a status removes any event currently in that status from the FRA report counts. The event still exists, is still visible per the normal VISIBILITY rules, still counts in the project's real-time tallies. It just doesn't appear in the monthly baked snapshot.

Typical use:

  • "Awaiting acknowledgement" / "On hold" / "Cancelled" statuses that represent administrative limbo — counted in real-time dashboards is misleading; excluding them from the monthly bake keeps reports cleaner.

Set in the admin panel when editing the status.

Note: this is the FRA-specific version of the more general "workflow visibility" filters. The status is still visible to users; just not visible in the FRA snapshot.


The FRA dashboard surfaces

Three views, switched via the dashboard's button bar (the same horizontal strip that switches between Your Workflows / All Workflows / Compliance views — see DASHBOARD):

  1. Fire Risk Assessment (#fraOverview) — overview charts. Aggregate counts (total / complete / overdue) across projects, trend over recent months. Driven by the monthly WorkflowFraReport rows.
  2. FRA by Site (#fraSites) — per-project table. One row per project with its current FRA total / complete / overdue. Has a kebab on each row for navigation into the project's workflow table filtered to FRA events.
  3. FRA All (#workflowAllReports filtered to FRA) — the full workflow events table for FRA workflows only. Same shape as the All Workflows view but filtered by workflow_workflow.is_fra=True.

All three are visible to users with UserProfile.show_fra=True.


UserProfile.show_fra — the visibility gate

The FRA dashboard surfaces are gated by a per-user flag:

  • show_fra=True — FRA dashboard buttons appear in the button bar; the three FRA views are accessible.
  • show_fra=False (default) — FRA buttons hidden; the user sees no FRA dashboard, regardless of permissions or tenancy.

This is a UI-level toggle, not a security boundary. A user with show_fra=False could still see FRA workflow events in the per-project workflow table (subject to normal role visibility); they just don't get the cross-project FRA dashboard.

Set per user via Django admin → Users → User Profile → "Show FRA". Bulk-toggleable if needed.

There's also a related flag show_all_dashboards — when True, ignores show_fra + show_compliance and shows everything including "All Workflows." Useful for tenant admins / power users.


Practical operations

Create an FRA workflow

  1. Admin → Workflow → Workflows → Add (or edit existing).
  2. Tick is_fra.
  3. Configure statuses + transitions normally — none of the role / notification / date / state behaviour changes.
  4. Save.

The workflow now appears as an FRA workflow in the picker (for users with show_fra) and its events count in FRA reports.

Enable FRA dashboard for a user

Admin → Users → (pick user) → User Profile → tick Show FRA → save.

Effect: next page load, the user sees the FRA button bar + the three FRA views.

Trigger an immediate FRA report refresh

Open the FRA dashboard → click Refresh (refresh_fra_reports). Recomputes the current month's WorkflowFraReport rows synchronously.

Exclude a status from FRA snapshots

Admin → Workflow → Statuses → (pick) → tick Exclude from FRA baked reports → save.

Effective on next cron pass / next manual refresh.


Troubleshooting

Symptom Likely cause First check
FRA dashboard buttons not visible UserProfile.show_fra=False (the default) Toggle the flag in admin
FRA report numbers don't match what I see in the workflow table Some events are in a status with exclude_from_fra_baked_reports=True Status's exclusion flag
FRA report not updating after a workflow change The cron hasn't run since (next pass is midnight). For an immediate update, click the dashboard's Refresh button Trigger manual refresh
Workflow events with is_fra set are counted, but the workflow itself doesn't show in the picker Picker still filters by tenancy + locked_to_systems. is_fra doesn't bypass those See WORKFLOWS § Workflow definitions
Created a new FRA workflow but no monthly report row appears Reports are upserted by fra_report on the cron pass. If no FRA events exist yet for a project, no row is created Either wait for events to be created, or run the cron manually
FRA dashboard shows project counts even though I removed access from this user The dashboard's per-project rollup IS tenancy-filtered, but the underlying WorkflowFraReport row exists regardless. Cross-check that the user's tenancy excludes the project Tenancy check
show_all_dashboards=True user still doesn't see FRA tabs They DO see FRA (show_all_dashboards bypasses show_fra). If they don't, it's likely a frontend cache or a permission issue rather than the show_fra flag Hard refresh; check group memberships

For developers

This page is for users and admins. Implementation pointers:

  • Model: apps.workflow.models.WorkflowWorkflow.is_fra (bool), WorkflowStatus.exclude_from_fra_baked_reports (bool), WorkflowFraReport (the baked monthly row).
  • Cron pass: core/management/commands/scheduler_cron.py: fra_report(). Computes total/complete/overdue per project per current month, upserts a WorkflowFraReport row. Excludes events in exclude_from_fra_baked_reports statuses.
  • Manual refresh: apps_dashboard_callback.refresh_fra_reports fires the same backend logic synchronously via an API call.
  • User profile flags: core.models.UserProfile.show_fra (bool), show_all_dashboards (bool — overrides show_fra + show_compliance to True if True).
  • Frontend table: apps_dashboard.js: dtFraAll (the FRA-by-Site table). FRA All is the standard All-Workflows table filtered client-side.

See devdocs/ for codebase-level material.