Skip to content

Post-event surveys (Day 1 / Day 2 / Scholarship recipients) - #2135

Draft
maebeale wants to merge 11 commits into
mainfrom
maebeale/post-training-survey-form
Draft

Post-event surveys (Day 1 / Day 2 / Scholarship recipients)#2135
maebeale wants to merge 11 commits into
mainfrom
maebeale/post-training-survey-form

Conversation

@maebeale

@maebeale maebeale commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 5 Inspect 🔬 new subsystem — 4 migrations, form-builder presets, a new join model, submission service, a readiness state change, and roster/editor/ticket UI

Brings AWBW's post-training evaluations in-house (previously an external form tool), delivered inline on the registration ticket via built-in callouts.

Why

  • Track survey completion in-app and surface it on the registrants Status column, instead of chasing an external tool; and capture the answers where the rest of the registration data lives.

What

  • Three survey built-in callouts (Day 1 / Day 2 / Scholarship recipients). Each picks its inline form via a Forms dropdown in the callout editor (form_id), drips on a relevant default (day N: 30 min before that day's end; scholarship: 30 min before event end), and Day 2 only seeds on multi-day events.
  • Inline survey page (Events::CalloutsController#survey): drip notice before the open date → the form → read-only answers with an edit affordance after submitting. Ticket cards link to it (recipient card gated to scholarship recipients).
  • Per-resource "clarity" questions: a FormField linked to resources (new FormFieldResource join) fans out to one input per resource, snapshotting the full sentence into question_name_when_answered (nil form_field).
  • Completion → Status: only the recipients survey gates readiness — a new survey_pending state (recipients-only, published + past-drip), post_survey_completed_at completion cache + roster filter/badge + an independent admin "Survey received" toggle on the registration edit page.
  • Two profile-backed questions write through to the Person (anonymous_contributions — new column; display_name_preference) with an Ahoy event on change.
  • Form-builder presets: the survey questions are pickable builder sections (day_1_survey, day_2_survey, recipient_survey, content_sharing_preferences), so staff can build/adjust the forms in prod; a seed assembles the 3 template forms.
  • Staff FYI email on submission (default system address).

Not in this PR

Testing — model/service/request/mailer specs (readiness gating incl. drip + audience, submission incl. profile sync + Ahoy + completion, drip withholding, built-in seeding + drips, form-builder parity). Green + rubocop clean.

Copilot AI lite review requested due to automatic review settings August 9, 2026 20:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 9, 2026 20:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 9, 2026 20:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 9, 2026 20:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 9, 2026 20:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 9, 2026 20:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 9, 2026 20:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 9, 2026 20:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 9, 2026 20:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

maebeale and others added 11 commits August 9, 2026 22:33
Foundations for the in-house post-event survey feature: a callout's inline
survey form (registration_ticket_callouts.form_id), the readiness completion
cache (event_registrations.post_survey_completed_at, mirroring
certificate_sent_at), the profile anonymity preference set from a survey
question (people.anonymous_contributions), and the direct FormField->Resource
link that drives per-resource clarity questions (form_field_resources).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
FormFieldResource join (+ FormField has_many resources / per_resource?),
RegistrationTicketCallout belongs_to :form, EventRegistration post-survey
completion helpers, and Person display-name / anonymity option constants for the
two profile-backed survey questions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Three new builder sections (day_1_survey, day_2_survey, recipient_survey) plus a
shared content_sharing_preferences section carrying the two profile-backed
questions (anonymous_contributions, display_name_preference). The clarity radios
fan out over linked resources. Seeds the 3 standalone template forms idempotently
so the survey callouts have a default form; staff can rebuild/edit them in the
form builder in prod.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Three new survey built-ins wired to their template forms via the callout form_id,
with relevant default drips (day N: 30 min before that day's end time; scholarship:
30 min before event end). Adds a seed_if gate so Day 2 only seeds on multi-day
events. Updates the existing built-in-set expectations.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds a 'Survey pending' readiness state between Ready and Certificate pending:
a scholarship recipient with a live (published, past-drip) but unsubmitted
recipients survey can't reach the certificate queue until it's in. Reads a plain
column plus the event's memoized survey callout, so no per-row roster query. Adds
the roster Status filter option, the badge color, and an independent admin
'Survey received' toggle on the registration edit page.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
SurveySubmission records a role-tagged FormSubmission with static answers and
per-resource clarity answers (nil form_field, full sentence snapshotted), writes
the anonymity + name-display questions through to the Person profile (reporting
the changes for Ahoy), and stamps post_survey_completed_at for a recipient's
recipients survey. NotificationMailer#survey_submitted_fyi heads up staff on
submission via the default system address.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A callout's inline survey form is picked from the standalone survey templates via
a Forms dropdown under Linked resources (form_id permitted on the nested callout
attributes). Updates the built-in-set expectation in the events request spec.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds the public survey page (Events::CalloutsController#survey / #submit_survey):
drip notice before the open date, the form to fill (static fields + per-resource
clarity questions), and read-only answers with an edit affordance after
submitting. Submit records via SurveySubmission, Ahoy-tracks profile changes, and
emails the staff FYI. Adds the three ticket cards (recipient card gated to
scholarship recipients) linking to the page.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New SurveySubmission service, the survey_pending readiness state, and the three
survey built-ins (form_id + drips + seed_if). Fixes the built-in-set expectation
in the ticket callouts request spec.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The rebase took main's schema.rb at the migrations commit; re-dumped it so the
four post-event-survey migrations land on top of main's current schema.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The sample ticket now materializes 11 built-ins (8 + Day 1/Day 2/Scholarship
recipients surveys).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maebeale
maebeale force-pushed the maebeale/post-training-survey-form branch from 3aa5725 to 3cd6721 Compare August 10, 2026 02:45
Copilot AI review requested due to automatic review settings August 10, 2026 02:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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