Repository navigation
Conversation
| # see prior state, not the row we're about to create. | ||
| existing = @event.event_registrations.find_by(registrant: person) | ||
| event_registration = existing || create_event_registration(person) | ||
| submission = create_form_submission(person) |
There was a problem hiding this comment.
🤖 From Claude: The submission and its answers are now saved before the org capture, so the org-type "Other" can point at its answer. If saving an answer fails, the whole transaction still rolls back. The resubmission diff only compares this submission with the previous one, so it doesn't depend on this order.
| end | ||
| return redirect_to registration_ce_path(@event_registration.slug) if ce_form_locked?(@callout) | ||
|
|
||
| Current.source = "ticket_callout" |
There was a problem hiding this comment.
🤖 From Claude: Setting a source makes signed-out callout submitters (and bulk payers) generate lifecycle events for the first time, the same as public forms. Expect more Ahoy rows per submission: the submission, its answers, and any profile write-through.
6270b51 to
72e3e31
Compare
| return event.properties["form_submission_id"].to_i if stamped?(event) | ||
| return unless event.resource_type == "FormSubmission" | ||
|
|
||
| event.resource_id if event.name == "create.form_submission" || relink?(event) |
There was a problem hiding this comment.
🤖 From Claude: Matching only uses a submission that was created or had just its metadata changed in that request. That way a person merge, which reassigns person_id, can't credit its own deletes and edits to a submission. Run it as a dry run first in production and check the counts.
3b40c67 to
8282570
Compare
71e5e0f to
75e0646
Compare
e138950 to
6402366
Compare
75e0646 to
8a29c7a
Compare
6402366 to
ee604ba
Compare
8a29c7a to
6d427ce
Compare
ee604ba to
d9e1061
Compare
| return | ||
| end | ||
|
|
||
| Current.source = "bulk_payment" |
There was a problem hiding this comment.
@jmilljr24 are you comfortable w using Current for this?
4823712 to
9ce8ef0
Compare
d9e1061 to
2de40cc
Compare
4843437 to
3691787
Compare
2de40cc to
698afad
Compare
53001ed to
41ba248
Compare
…org linking Those paths never set the submission id on their change events, and signed-out bulk payers and callout submitters weren't logged at all, so their changes couldn't be traced to a submission. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Each controller had to remember to set Current.form_submission_id after calling its service; the service already has the submission, so setting it there means a new caller can't forget it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Older changes get linked only if someone runs the console backfill, so the feature card shouldn't promise it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
698afad to
e1728b5
Compare
🤖 suggested review level: 3 Read 📖 turns on change tracking for signed-out bulk payers and ticket-form submitters; moves the submission id into the services
Every form now records which submission made each change, so the change-log links from #2719 work everywhere.
Stacked on #2719. That PR adds the change-log links and the callout capture. This one covers the
Current-based recording.PublicRegistration,PublicFormSubmission,BulkPaymentandCalloutFormSubmissionsetCurrent.form_submission_idon success, so a new caller can't forget it. The controller lines are gone.Current.source(bulk_payment/ticket_callout). Without a source or a signed-in user, nothing is logged. Public forms and registrations already work this way.Optional: link older changes (run by hand after deploy)
Paste into a production Rails console. It's a dry run as written: check the counts, then run again with
dry_run = false. It never touches an event that already has an id, so re-running is safe.metadata), passes that id to its other unstamped changes.🤖 Generated with Claude Code