Post-event surveys (Day 1 / Day 2 / Scholarship recipients) - #2135
Draft
maebeale wants to merge 11 commits into
Draft
Post-event surveys (Day 1 / Day 2 / Scholarship recipients)#2135maebeale wants to merge 11 commits into
maebeale wants to merge 11 commits into
Conversation
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
force-pushed
the
maebeale/post-training-survey-form
branch
from
August 10, 2026 02:45
3aa5725 to
3cd6721
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 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
What
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.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).FormFieldlinked to resources (newFormFieldResourcejoin) fans out to one input per resource, snapshotting the full sentence intoquestion_name_when_answered(nilform_field).survey_pendingstate (recipients-only, published + past-drip),post_survey_completed_atcompletion cache + roster filter/badge + an independent admin "Survey received" toggle on the registration edit page.anonymous_contributions— new column;display_name_preference) with an Ahoy event on change.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.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.