Skip to content

Warn organizers when event dates change after waivers went out - #156

Merged
leowilkin merged 1 commit into
mainfrom
waiver-date-change-banner
Oct 9, 2026
Merged

leowilkin merged 1 commit into
mainfrom
waiver-date-change-banner

Conversation

@leowilkin

Copy link
Copy Markdown
Member

Problem

When a waiver template is cloned for an event, Docuseal::DefaultTemplateSetup prints the event dates onto it, and each sent DocuSeal submission keeps a snapshot of its template. If the event's dates move later, every waiver already sent (and every new one) still shows the old dates. Nothing in Attend tells anyone.

Change

  • Saving new dates still works. If the event's start or end day changes (in the event's timezone, the way the waiver prints it) and at least one waiver or freedom waiver has already gone out through DocuSeal, the event gets waiver_dates_stale_since set.
    • This happens in a model callback, so it covers the edit form, the setup wizard and the API.
    • Moving a time within the same day doesn't trigger it, and neither does setting dates for the first time. A timezone change that shifts the local days does.
  • While the flag is set, every admin page for the event shows a large amber banner: "Reach out to Attend team to get waivers updated".
  • Global admins get a "Waivers updated" button (in the dashed admin-only box) that clears the flag. The policy restricts it to global admins, and the action is whitelisted in AuditLog.

Testing

  • New model and request specs: 12 examples, all passing.
  • Ran the event model spec and the admin and API request specs: 626 examples. The only failure is spec/requests/api/v1/webhooks_spec.rb:247, which depends on whether a DocuSeal webhook secret is configured locally. It passes or fails based on the local master.key, not this change.
  • Checked end to end on a local server: changed dates through the edit form on an event with a sent waiver, saw the banner, cleared it with the button, and confirmed the audit log row.
  • Not checked visually yet.

After deploy

Events whose dates moved before this shipped won't be flagged automatically. Set the flag by hand where needed.

DocuSeal waiver templates have the event dates printed on them at clone
time, and each sent waiver snapshots its template. Moving an event's
dates afterwards silently leaves every waiver showing the old dates.

Saving still works, but the event is now flagged and every admin page
for it shows a banner telling organizers to reach out to the Attend
team. Global admins clear it once the templates are fixed.
@leowilkin
leowilkin merged commit 69310f6 into main Oct 9, 2026
14 checks passed
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.

1 participant