Keysproperty operations Corbelstone Residential

#408 · Duplicate ticket

done Mon 16:15 · ticket 5613

Ledger row
policy v2
The call
POST /tickets/5613/merge into=5612
Action, tier
merge_duplicate_ticket, tier 0
Decided by
rules: Same cleaning in the same building, 35 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 74 this hour).
authority
conditions
cooldown
budget
Definition
duplicate_ticket v2
At stake
a second vendor call-out for one fault
Outcome
Ticket 5613 merged into ticket 5612.
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": 74,
  "category": "cleaning",
  "currency": null,
  "minutes_apart": 35,
  "original_source": "phone",
  "original_ticket_id": 5612,
  "original_vendor_id": null,
  "scope": "common",
  "source": "tenant_app",
  "stake_note": "a second vendor call-out for one fault",
  "started_at": "2026-11-02T16:14:42.423405",
  "summary": "Common area needs cleaning",
  "ticket_id": 5613,
  "unit_id": null,
  "vendor_id_on_duplicate": null
}

Before and after

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

Arguments

{
  "original_ticket_id": 5612,
  "ticket_id": 5613
}