Skip to main content

record_key

Function record_key 

Source
pub fn record_key(ticket: &Ticket, scope: Option<&str>) -> RecordKey
Expand description

The stable RecordKey for a ticket: tickets / <provider> / <id>, where <id> is scoped_uid — the ticket’s uid, optionally prefixed with a board/connection discriminator.

scope distinguishes the same external item imported under two different connections (ADR 0010). A Projects v2 uid is only owner/repo#N, with no board component, so an issue sitting on two configured boards would otherwise produce IDENTICAL keys with differing Status categories — alternating syncs then thrash the one record and lose per-board status (#159). Passing the connection name as scope yields distinct keys per board. Board-agnostic callers (plain issue sources, single-board) pass None and are unchanged.

Keying off a deterministic RecordKey is what lets ticket queries join the vector and graph layers (ADR 0008/0010) — they all address the same record.