Skip to content

feat: add RSVP close time to workshops#2691

Merged
mroderick merged 9 commits into
masterfrom
feature/rsvp-close-time-clean
Jul 9, 2026
Merged

feat: add RSVP close time to workshops#2691
mroderick merged 9 commits into
masterfrom
feature/rsvp-close-time-clean

Conversation

@mroderick

@mroderick mroderick commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Fixes #2687

What

Add RSVP closing date/time to workshops, mirroring the existing "Open RSVPs at" pattern. Organisers can set when RSVPs close automatically — nil means RSVPs stay open until the workshop starts.

image

Changes

  • Model: rsvp_closes_at virtual attrs (rsvp_close_local_date/rsvp_close_local_time) via datetime_from_fields, timezone-aware getter, validation that close time is before workshop start
  • Controller: WorkshopInvitationController#accept gated by rsvp_available?; admin attendance management unaffected
  • Form: close date/time fields in "RSVP Timing" card with pickadate selectors, side-by-side column layout
  • Detail page: shows RSVP close time on admin workshop view when set
  • Form layout: improved open date/time fields to side-by-side columns with clear labels and card title

Verification

  • rsvp_closes_at nil → RSVPs stay open (current default)
  • Close time before workshop start → valid
  • Close time after workshop start → validation error
  • RSVPs closed → member sees "RSVPs for this workshop are now closed."
  • Organisers bypass via admin invitation management

@mroderick mroderick force-pushed the feature/rsvp-close-time-clean branch 4 times, most recently from 6e34a20 to 539d9fb Compare July 7, 2026 12:29
@mroderick mroderick marked this pull request as ready for review July 7, 2026 12:31
@mroderick mroderick requested a review from olleolleolle July 7, 2026 12:31
@kikilondon

Copy link
Copy Markdown

Hi Morgan, Thanks for putting this PR together so quickly.
I noticed a small loophole regarding high-security venues where we must strictly freeze the guest list 48 hours in advance.

In InvitationControllerConcerns#reject, the current logic auto-promotes waitlisted users if someone cancels, up until 3.5 hours before the event:

if @invitation.workshop.date_and_time - 3.5.hours >= Time.zone.now

Because this bypasses the new closing time feature, someone could be auto-promoted to the confirmed list after we have already submitted our finalized security list to the venue.

Would it be possible to update this logic so waitlist auto-promotions also respect the newrsvp_closes_attime?

@mroderick

Copy link
Copy Markdown
Collaborator Author

@kikilondon thank you for the clarification! I've added a fix commit

mroderick added 7 commits July 8, 2026 13:39
The rsvp_closes_at column already exists on the workshops table
(migration 20150211023345, added in 84f55d0 and later renamed from
rsvp_close_time). This commit adds the model layer: virtual attributes,
timezone-aware getter, before_validation callback, and validation that
close time is before the workshop start.
@mroderick mroderick force-pushed the feature/rsvp-close-time-clean branch from dcb235a to d7e14d2 Compare July 8, 2026 11:40
Comment thread app/models/workshop.rb Outdated
date_field = :"#{prefix}_local_date"
time_field = :"#{prefix}_local_time"
date_val = send(date_field)
time_val = send(time_field)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: can these be public_send ?

@olleolleolle olleolleolle left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice!

@mroderick mroderick enabled auto-merge July 9, 2026 08:46
@mroderick mroderick merged commit 6ddfe69 into master Jul 9, 2026
8 checks passed
@mroderick mroderick deleted the feature/rsvp-close-time-clean branch July 9, 2026 08:57
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.

London RSVPs don't close automatically at 3pm

3 participants