Skip to content

Let dual-role members choose their attendance role at RSVP and check-in - #3042

Open
mroderick wants to merge 5 commits into
masterfrom
fix/dual-role-attendance-choice
Open

mroderick wants to merge 5 commits into
masterfrom
fix/dual-role-attendance-choice

Conversation

@mroderick

@mroderick mroderick commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #3040

Summary

A member subscribed to a chapter as both student and coach could only attend in one role. The invitation email fixed the role to whichever invitation pass ran first, and self check-in refused the other role. This change lets the member choose the role at RSVP and at the door.

image

It is a short-term fix: I'm working on a proposal to change the data model a bit, to make it adapt to codebar, and not the other way around.

What changes

  • The invitation landing page shows both role buttons, "Attend as a student" and "Attend as a coach", to members subscribed as both. The chosen role wins and can change until the member accepts or joins a waiting list, and a cancelled member can choose again.
  • Joining the waiting list takes the chosen role, so a dual-role member can join the student or the coach waiting list.
  • Self check-in changes the role of an undecided invitation instead of refusing the mismatch.
  • A role assignment requires a subscription to that role, on the workshop RSVP action, the invitation actions and self check-in. A member without subscriptions can still check in in the role of their invitation, and the event page keeps offering both roles to every member, as its UI always has.
  • The role is written in the same update that completes the accept, the waiting-list join or the check-in, so a refused request changes nothing.
  • Single-role members see no change in the normal flow.

Review notes

Focus on the role-flip rules in RoleChoiceConcerns and the check-in behaviour change.

Risks: an accepted or waitlisted invitation must keep its role. A flip on a waitlisted invitation would corrupt the per-role waiting list, because the waiting list reads the role from the invitation.

Deliberately not done, to keep this small: the invitation email copy still carries the provisional role, a member on a waiting list must leave it before changing role, and the "no spots left" message is unchanged. Those go with the groups-removal proposal.

Detail

The workshop page already offered "Attend as a student" and "Attend as a coach" to dual-role members, and WorkshopsController#rsvp already flipped the invitation role to the member's choice. This change extends the same semantics to the surfaces where the bug bit: the invitation landing page that the email links to, the waiting-list join, and self check-in. The subscription rule makes the server enforce exactly what each surface's views offer.

RoleChoiceConcerns holds the rule. The role can change while the invitation is undecided and the member is subscribed to the role they take. It stays fixed once the member accepts or once the invitation carries a waiting-list entry. The chosen role is evaluated against those rules and written with the action it completes.

The waiting-list partial now takes the role and the button label as locals, so the chooser can render one join form per role. The student and coach join forms merged into one, which is the only visible change to the existing full-role flow.

@mroderick
mroderick force-pushed the fix/dual-role-attendance-choice branch from d98db41 to 4c2c1fe Compare October 16, 2026 05:26
@mroderick
mroderick marked this pull request as ready for review October 16, 2026 05:52
@mroderick
mroderick marked this pull request as draft October 16, 2026 05:54
A member subscribed to a chapter as both student and coach received one invitation whose role was frozen to whichever invitation pass ran first, so they could only attend in that role (issue #3040). The invitation landing page now offers both role buttons to such members, and joining the waiting list takes the chosen role. The member's choice wins until they accept or join a waiting list, and a cancelled member can choose again. A role assignment requires a subscription to that role, and the role is written with the action it completes, so a refused request changes nothing. Single-role members keep the current flow.
Self check-in refused a role that differed from the invitation role, which trapped dual-role members who had been invited as a student at the door (issue #3040). The door choice now changes the role of an undecided invitation, written together with the check-in so a refused check-in changes nothing. The role must be one the member is subscribed to, and a member without subscriptions checks in in the role of their invitation. Invitations that are accepted or on a waiting list keep their role and get the existing message instead.
The invitation landing page split its row 8/4, leaving the attendance
card cramped. Both columns now take 6 from the md breakpoint up.
@mroderick
mroderick force-pushed the fix/dual-role-attendance-choice branch from fdea0bb to 2a94bcb Compare October 16, 2026 06:44
@mroderick
mroderick marked this pull request as ready for review October 16, 2026 07:06
Comment thread app/controllers/invitations_controller.rb Outdated
Comment thread app/controllers/waiting_lists_controller.rb Outdated
…d call

Review feedback from Olle: == is the conventional choice for string comparison, and the record call wrapped better with one argument per line. No RuboCop rule covers the eql? preference, so this matches the convention by hand.
@mroderick

Copy link
Copy Markdown
Collaborator Author

The CI failure in Tests (Group 0) is a flake in the admin member search spec, unrelated to this PR. The search matches name and email with ILIKE '%Julie%', and a Faker draw containing "julie" (about 0.09% per member) creates a second match, so the controller renders the pick list instead of redirecting. Fix in #3044.

This branch has not been deployed

No deployments
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.

Dual Invitiation issue

2 participants