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
PR #2245 makes PaperTrail the source of record-change activity and adds an indexed versions.subject_person_id populated across the registration cluster, money/membership models, and the person cluster (Person/Affiliation/Address/ContactMethod/Asset; Organization/Discount tracked but unscoped). It does not build the timeline itself — that's this issue.
Goal
Build the real activity timeline as a chronological interleave of three sources, each doing what it's best at:
PaperTrail — record changes (create/update/destroy, incl. deleted records)
Ahoy — visits + page/views (PaperTrail can't produce these)
Scope
Person timeline — single indexed sweep PaperTrail::Version.where(subject_person_id: person.id).order(:created_at), merged with the person's Notifications and Ahoy visit/view events. Extend Analytics::PersonTimeline (already interleaves sources).
Per-record timeline — a record's own versions plus its children's (query by item_type/item_id for the record + its dependent children). E.g. a registration timeline = the registration + its attendance entries, checklist completions, org links, CE regs, allocations, comments.
Deleted-record viewer — versions persist after deletion but nothing surfaces them today (the Change Log partial reads a live record.versions). Add a view that queries the versions table directly.
Retire the redundant Ahoy lifecycle/mutation tracking (AhoyTrackable) once PaperTrail fully covers it. Keep Ahoy's visit/view tracking — that's the piece only Ahoy does.
🤖 From Claude:
Background
PR #2245 makes PaperTrail the source of record-change activity and adds an indexed
versions.subject_person_idpopulated across the registration cluster, money/membership models, and the person cluster (Person/Affiliation/Address/ContactMethod/Asset; Organization/Discount tracked but unscoped). It does not build the timeline itself — that's this issue.Goal
Build the real activity timeline as a chronological interleave of three sources, each doing what it's best at:
Scope
PaperTrail::Version.where(subject_person_id: person.id).order(:created_at), merged with the person's Notifications and Ahoy visit/view events. ExtendAnalytics::PersonTimeline(already interleaves sources).item_type/item_idfor the record + its dependent children). E.g. a registration timeline = the registration + its attendance entries, checklist completions, org links, CE regs, allocations, comments.record.versions). Add a view that queries theversionstable directly.Then (separate cleanup, after this lands)
AhoyTrackable) once PaperTrail fully covers it. Keep Ahoy's visit/view tracking — that's the piece only Ahoy does.Related