Keysproperty operations Corbelstone Residential

#317 · Water alarm, no ticket · Saltire Mansions

done Sat 16:35 · alarm 1957

Ledger row
policy v2
The call
POST /tickets source=alarm alarm=1957
Action, tier
open_ticket_from_alarm, tier 0
Decided by
rules: Leak alarm live 11 minutes with no ticket; open an emergency ticket now.
Controller
Allowed: open_ticket_from_alarm is tier 0 (just do it); within budget (0 of 6 actions at building 94 this hour).
authority
conditions
cooldown
budget
Definition
water_alarm_no_ticket v1
At stake
water running 11 min with nobody sent
Outcome
Emergency ticket 5659 opened from alarm 1957, vendor 26 dispatched.
Undo
Close the ticket as raised in error and cancel the dispatch.

Undo

Restores the before-snapshot below and writes a new row.

Evidence

{
  "alarm_id": 1957,
  "amount_at_risk": null,
  "asset_id": 2595,
  "building": "Saltire Mansions",
  "building_id": 94,
  "currency": null,
  "kind": "water_leak",
  "minutes_active": 11,
  "raised_at": "2026-10-31 16:24:44.489616",
  "sensor": "Home 4B",
  "stake_note": "water running 11 min with nobody sent",
  "started_at": "2026-10-31T16:34:44.489616",
  "unit_id": 6247
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27056,
        "ticket_id": 5659,
        "type": "created"
      },
      {
        "id": 27057,
        "ticket_id": 5659,
        "type": "vendor_dispatched"
      }
    ],
    "tickets": [
      {
        "alarm_id": 1957,
        "assigned_at": "2026-10-31T16:35:00",
        "attended_at": "2026-10-31T17:39:25.869948",
        "building_id": 94,
        "category": "leak",
        "closed_at": "2026-10-31T20:05:03.193311",
        "completed_at": "2026-10-31T19:05:03.193311",
        "due_at": "2026-10-31T20:35:00",
        "duplicate_of": null,
        "id": 5659,
        "opened_at": "2026-10-31T16:35:00",
        "priority": "emergency",
        "reported_by": "keys operator",
        "source": "alarm",
        "status": "assigned",
        "summary": "Water alarm: leak detected",
        "trade": "plumbing",
        "unit_id": 6247,
        "vendor_id": 26
      },
      {
        "closed_at": "2026-10-31T19:21:55.661524",
        "duplicate_of": 5659,
        "id": 5500,
        "status": "merged"
      }
    ]
  },
  "before": {
    "tickets": [
      {
        "closed_at": "2026-11-01T08:31:21.389301",
        "duplicate_of": null,
        "id": 5500,
        "status": "closed"
      }
    ]
  },
  "endpoint": "POST /tickets source=alarm alarm=1957",
  "note": "Emergency ticket 5659 opened from alarm 1957, vendor 26 dispatched.",
  "ok": true,
  "rollback_fn_name": "undo_open_ticket_from_alarm"
}

Arguments

{
  "alarm_id": 1957
}