HOLD: Capture known profile data as form answers on registration & bulk payment submissions#1683
HOLD: Capture known profile data as form answers on registration & bulk payment submissions#1683maebeale wants to merge 2 commits into
Conversation
Logged-in payers never see the payer information fields (they're logged_out_only), so those answers were missing from the submission even though we already know them. Capture them from the signed-in person so the submission records who paid, without disturbing their contact records. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Hidden profile fields a logged-in registrant already has on file were never saved to the form submission. Pull that data from the person's record at submission time so each submission captures everything known then, leaving the registrant's own records untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
||
| assign_tags(person, organization) | ||
|
|
||
| backfill_profile_fields(person) if @person |
There was a problem hiding this comment.
🤖 From Claude: Placed after the create_*/assign_tags block on purpose: those guards read the original @form_params, so backfilling here records the data as answers without re-running address/contact creation on the person's own profile data.
| "last_name" => person.last_name, | ||
| "primary_email" => person.email, | ||
| "primary_email_type" => person.email_type&.capitalize, | ||
| "nickname" => (person.first_name if person.legal_first_name.present?), |
There was a problem hiding this comment.
🤖 From Claude: Reverses resolve_names: when a legal name is on file the person goes by a nickname, so first_name field gets the legal name and nickname gets the preferred first_name. Skipped (blank) otherwise.
| person = find_or_create_person | ||
| create_phone_contact(person) if field_value("payer_phone").present? | ||
| if @person | ||
| backfill_payer_fields(@person) |
There was a problem hiding this comment.
🤖 From Claude: Logged-in branch backfills the hidden payer fields and intentionally skips create_phone_contact, so the signed-in person's existing contact methods are left untouched.
jmilljr24
left a comment
There was a problem hiding this comment.
The bulk payment works as expected. Maybe the temp submitted by I added could be removed if redundant?
Viewing a registration submission did not display Person data for the normal contact info.


What is the goal of this PR and why is this important?
logged_out_only) and never re-asked.How did you approach the change?
bulk_payment.rb): when a signed-inpersonis present, backfill the hidden payer fields (payer_first_name,payer_last_name,payer_email,payer_phone,payer_organization) from their profile before saving form answers.public_registration.rb): addedbackfill_profile_fields, mirroring the controller'sperson_known_identifiersmapping, to fill hidden identity/contact fields (name, nickname, emails + types, pronouns, mailing address, phone + type) from the person's record.personal→Personal).Anything else to add?
🤖 Generated with Claude Code