You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(spp_hazard): add severity_numeric bridge and document breaking changes
Softens the downstream impact of the severity -> CAP vocabulary migration
(re-land from #76):
- add a stored, computed severity_numeric (5=extreme .. 1=unknown, 0=unset)
on spp.hazard.incident so downstream ordering/threshold logic can consume
a numeric scale without resolving CAP vocabulary codes (mirrors the
spp_drims incident-area mapping).
- document the breaking changes in the changelog: the severity /
severity_override removal+rename, the new spp_vocabulary dependency, and
the model-level category_id / start_date required relaxation.
Copy file name to clipboardExpand all lines: spp_hazard/readme/HISTORY.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,10 @@
1
1
### 19.0.2.1.0
2
2
3
+
-**BREAKING**: the 1-5 `severity` Selection on `spp.hazard.incident` and `severity_override` on `spp.hazard.incident.area` are removed and replaced by `severity_id` / `severity_override_id` (Many2one to `spp.vocabulary.code` on the CAP severity namespace). Modules that extend these models must migrate: views that reference `<field name="severity">` / `severity_override`, code that reads `record.severity`, records created with `severity="…"`, and any `fields_to_log` entries or domains naming the old fields. Read `severity_numeric` (below) where a numeric scale is needed.
4
+
-**BREAKING**: `spp_hazard` now depends on `spp_vocabulary`.
5
+
-**BREAKING**: `category_id` and `start_date` are no longer `required` at the model level (they remain required in the incident form view) so alert ingestion can create incidents that lack them.
3
6
- feat: severity is now a CAP v1.2 vocabulary code (`severity_id`, `severity_override_id` on incident areas) instead of a hardcoded 1-5 Selection; adds CAP urgency/certainty/message-type/event fields, alert ingestion (`create_incident_from_alert`), and incident `uuid` (re-land from #76).
7
+
- feat: `spp.hazard.incident` exposes a stored `severity_numeric` (5=extreme, 4=severe, 3=moderate, 2=minor, 1=unknown, 0=unset) so downstream ordering and threshold logic can consume a numeric scale without resolving CAP vocabulary codes.
4
8
- feat: migration backfills legacy 1-5 severity values onto the vocabulary fields when upgrading from 19.0.2.0.x (1→minor, 2→moderate, 3→severe, 4→severe, 5→extreme); existing values are never overwritten and legacy columns are kept.
5
9
- fix: demo incident-area records now set `severity_override_id` vocabulary refs (the removed `severity_override` field broke demo installs).
<li><strong>BREAKING</strong>: the 1-5 <ttclass="docutils literal">severity</tt> Selection on
2460
+
<ttclass="docutils literal">spp.hazard.incident</tt> and <ttclass="docutils literal">severity_override</tt> on
2461
+
<ttclass="docutils literal">spp.hazard.incident.area</tt> are removed and replaced by
2462
+
<ttclass="docutils literal">severity_id</tt> / <ttclass="docutils literal">severity_override_id</tt> (Many2one to
2463
+
<ttclass="docutils literal">spp.vocabulary.code</tt> on the CAP severity namespace). Modules that
2464
+
extend these models must migrate: views that reference
2465
+
<ttclass="docutils literal"><field <spanclass="pre">name="severity"></span></tt> / <ttclass="docutils literal">severity_override</tt>, code that reads
2466
+
<ttclass="docutils literal">record.severity</tt>, records created with <ttclass="docutils literal"><spanclass="pre">severity="…"</span></tt>, and any
2467
+
<ttclass="docutils literal">fields_to_log</tt> entries or domains naming the old fields. Read
2468
+
<ttclass="docutils literal">severity_numeric</tt> (below) where a numeric scale is needed.</li>
2469
+
<li><strong>BREAKING</strong>: <ttclass="docutils literal">spp_hazard</tt> now depends on <ttclass="docutils literal">spp_vocabulary</tt>.</li>
2470
+
<li><strong>BREAKING</strong>: <ttclass="docutils literal">category_id</tt> and <ttclass="docutils literal">start_date</tt> are no longer
2471
+
<ttclass="docutils literal">required</tt> at the model level (they remain required in the incident
2472
+
form view) so alert ingestion can create incidents that lack them.</li>
2459
2473
<li>feat: severity is now a CAP v1.2 vocabulary code (<ttclass="docutils literal">severity_id</tt>,
2460
2474
<ttclass="docutils literal">severity_override_id</tt> on incident areas) instead of a hardcoded 1-5
2461
2475
Selection; adds CAP urgency/certainty/message-type/event fields, alert
2462
2476
ingestion (<ttclass="docutils literal">create_incident_from_alert</tt>), and incident <ttclass="docutils literal">uuid</tt>
2463
2477
(re-land from #76).</li>
2478
+
<li>feat: <ttclass="docutils literal">spp.hazard.incident</tt> exposes a stored <ttclass="docutils literal">severity_numeric</tt>
2479
+
(5=extreme, 4=severe, 3=moderate, 2=minor, 1=unknown, 0=unset) so
2480
+
downstream ordering and threshold logic can consume a numeric scale
2481
+
without resolving CAP vocabulary codes.</li>
2464
2482
<li>feat: migration backfills legacy 1-5 severity values onto the
2465
2483
vocabulary fields when upgrading from 19.0.2.0.x (1→minor, 2→moderate,
2466
2484
3→severe, 4→severe, 5→extreme); existing values are never overwritten
0 commit comments