Skip to content

Add new and returning attendees report#11213

Merged
nbudin merged 12 commits intomainfrom
11190-new-and-returning-attendees-report
Mar 9, 2026
Merged

Add new and returning attendees report#11213
nbudin merged 12 commits intomainfrom
11190-new-and-returning-attendees-report

Conversation

@nbudin
Copy link
Contributor

@nbudin nbudin commented Mar 5, 2026

Summary

  • Adds a new report showing which convention attendees are first-timers vs. returning attendees within an organization
  • Implements the SQL query from Add "new and returning attendees" report #11190 as ActiveRecord in ConventionReportsPresenter
  • New new_and_returning_attendees GraphQL field on ConventionReports type
  • New React page at /reports/new_and_returning_attendees showing a summary count and sortable tables for each group

Test plan

  • Visit /reports/new_and_returning_attendees at a convention that belongs to an organization
  • Verify new attendees (only this convention in the org) appear in the "New attendees" table
  • Verify returning attendees (attended other org conventions) appear in the "Returning attendees" table
  • Verify the summary counts match the table row counts
  • Verify the link appears in the Reports menu

Fixes #11190

🤖 Generated with Claude Code

Adds a report that shows which attendees at a convention have never
attended another of the organization's conventions before (new) versus
those who have (returning). Translates the SQL query from the issue into
an ActiveRecord implementation in ConventionReportsPresenter, with a
new GraphQL field and a React report page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nbudin nbudin added minor Bumps the minor version number on release feature labels Mar 5, 2026
nbudin and others added 11 commits March 5, 2026 14:05
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
UserConProfile has `has_one :ticket` (not `has_many :tickets`), so
joins(:tickets) raised a ConfigurationError. Fixed both join calls to
use :ticket (singular). Also adds a presenter test covering new
attendees, returning attendees, cross-convention filtering, and the
no-organization fallback.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add SignupRankedChoice to both RECORD_KEEPING_FIELDS (updated_by_id) and
USER_CON_PROFILE_REFERENCES (user_con_profile_id) so ranked choices are
reassigned to the winning user/profile rather than causing a FK violation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When two user_con_profiles in the same convention are merged, transfer
ranked choices by appending them after the winning profile's existing
choices per state, rather than using update_all which would violate the
unique constraint on (user_con_profile_id, state, priority).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…files

upload-artifact@v5 preserves directory structure, so downloaded artifacts
land at e.g. minitest-coverage/coverage/coverage.xml, not
minitest-coverage/coverage.xml.

Also change the rescue from StandardError (which silently swallowed missing
file errors) to only catch REXML::ParseException, and add an explicit abort
for missing files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…paths

actions/checkout@v5 cleans the workspace, which was deleting the
downloaded artifacts before the merge step could use them. Move
checkout to first so it runs before the downloads.

Also revert the coverage/ path prefix added in the previous commit —
upload-artifact@v5 strips the common directory prefix from globs,
so files land directly in the download directory, not nested under coverage/.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… command

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
app/graphql/types/convention_reports_type.rb 🟢 78.26% 🟢 80% 🟢 1.74%
app/graphql/types/new_and_returning_attendees_type.rb 🔴 0% 🟢 100% 🟢 100%
app/graphql/types/organization_attendance_count_type.rb 🔴 0% 🟢 80% 🟢 80%
app/presenters/convention_reports_presenter.rb 🔴 0% 🟠 50% 🟢 50%
test/presenters/convention_reports_presenter_test.rb 🔴 0% 🟢 100% 🟢 100%
Overall Coverage 🟢 52.25% 🟢 52.62% 🟢 0.37%

Minimum allowed coverage is 0%, this run produced 52.62%

@nbudin nbudin merged commit e8efaea into main Mar 9, 2026
19 checks passed
@nbudin nbudin deleted the 11190-new-and-returning-attendees-report branch March 9, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature minor Bumps the minor version number on release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "new and returning attendees" report

1 participant