Skip to content

Source school-district chart from affiliation address - #2534

Merged
maebeale merged 3 commits into
mainfrom
maebeale/school-district-chart-source
Sep 14, 2026
Merged

maebeale merged 3 commits into
mainfrom
maebeale/school-district-chart-source

Conversation

@maebeale

@maebeale maebeale commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 3 Read 📖 contained re-source of one breakdown + label change, covered by service/request specs

Re-sources the registrant "School districts" breakdown from the affiliation linked to each event registration (the org the person registered under) instead of their personal home address — a school district describes the institution someone facilitates at, not where they live.

What changes

  • Chart source — school_district_* now reads the affiliations linked to the event's registrations (Affiliation#event_registration_id) → organization_address → Address#district, in both the single-event dashboard and the cross-event attendees breakdowns. Only the org each registrant registered under counts — not every affiliation the person holds.
  • One row per district — a registrant who registered under more than one district counts in each (matches how the org breakdown already double-counts across orgs).
  • Filter + drill-in in sync — the attendees school_district drill-in and chip resolve people the same way (affiliation scoped to the in-scope registrations), so the list matches the chart. No as-of date needed: registration-scoping is inherently event-bounded.
  • Relabel — the address "District" field reads "School district" on the person and organization address forms and the person admin details. The column stays district (a rename is a data migration touching ~15 files for no user-facing gain; the app's param/chip/title vocab is already school_district).
  • Card title is now "School districts (via affiliation)".

Notes for the reviewer

  • The person's own-address "School district" field still exists (relabeled) but no longer feeds the chart — kept per request to relabel all address surfaces.
  • Dev seed now writes districts onto the registration-linked affiliation's org address so the seeded chart still shows data.

maebeale and others added 2 commits September 10, 2026 23:39
The registrant school-district breakdown read each person's own home
address, but a school district describes the institution someone
facilitates at — the org address on their affiliation, not their home.
Re-sources the chart, its filter chip, and the drill-in from
Affiliation#organization_address (active as of the event), counting a
registrant once per district they're affiliated with. Relabels the
address "District" field to "School district" everywhere it appears.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The attendees drill-in filtered on any affiliation pointing at the
district address; scope it to affiliations active today so an ended
affiliation can't appear in the list without being in the chart count.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maebeale
maebeale marked this pull request as ready for review September 11, 2026 15:42
Scope the school-district breakdown to the affiliation tied to each event
registration (the org the person registered under), not every affiliation
the person holds. Because the source is now registration-scoped it needs no
active-as-of date: the drill-in filter matches on event_registration_id too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maebeale
maebeale requested a review from jmilljr24 September 14, 2026 17:46
@maebeale
maebeale merged commit 1c891d5 into main Sep 14, 2026
3 checks passed
@maebeale
maebeale deleted the maebeale/school-district-chart-source branch September 14, 2026 18:35
@jmilljr24 jmilljr24 mentioned this pull request Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants