Keysproperty operations Corbelstone Residential

#407 · Duplicate ticket

done Mon 16:08 · ticket 5590

Ledger row
policy v2
The call
POST /tickets/5590/merge into=5589
Action, tier
merge_duplicate_ticket, tier 0
Decided by
rules: Same repair in the same home, 296 minutes apart; merge so only one vendor goes.
Controller
Allowed: merge_duplicate_ticket is tier 0 (just do it); within budget (0 of 6 actions at building 97 this hour).
authority
conditions
cooldown
budget
Definition
duplicate_ticket v2
At stake
a second vendor call-out for one fault
Outcome
Ticket 5590 merged into ticket 5589.
Undo
Reopen the duplicate as its own ticket.

Undo

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

Evidence

{
  "amount_at_risk": null,
  "building_id": 97,
  "category": "repair",
  "currency": null,
  "minutes_apart": 296,
  "original_source": "phone",
  "original_ticket_id": 5589,
  "original_vendor_id": null,
  "scope": "home",
  "source": "tenant_app",
  "stake_note": "a second vendor call-out for one fault",
  "started_at": "2026-11-02T16:07:40.370951",
  "summary": "General repair",
  "ticket_id": 5590,
  "unit_id": 6466,
  "vendor_id_on_duplicate": null
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27078,
        "ticket_id": 5590,
        "type": "merged_as_duplicate"
      }
    ],
    "tickets": [
      {
        "closed_at": "2026-11-02T16:08:00",
        "duplicate_of": 5589,
        "id": 5590,
        "status": "merged"
      }
    ]
  },
  "before": {
    "tickets": [
      {
        "closed_at": null,
        "duplicate_of": null,
        "id": 5590,
        "status": "new"
      }
    ]
  },
  "endpoint": "POST /tickets/5590/merge into=5589",
  "note": "Ticket 5590 merged into ticket 5589.",
  "ok": true,
  "rollback_fn_name": "undo_merge_duplicate_ticket"
}

Arguments

{
  "original_ticket_id": 5589,
  "ticket_id": 5590
}