Repository navigation
Conversation
A preview/apply script that converts an Involvement's settings, questions, registrants, answers and payments from the old Join Involvement registration to the new Registration Form, preserving history and not touching anyone's current sub-groups, extra values or profile. Includes ValidateRegistrationMigration.sql to check the result. Requires the PythonModel registration methods in bvcms (python-reg branch). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Read settings from their real (nested) XML groups; previously nothing outside AskItems was found. Look up the account code by Id first. - Create the person-info question from the old show/required flags, and record each registration's own person details as its answer (never written to the person record). - Convert fees, submission rules, sign-in/membership rules, timeout, prospect, shell, closed/full state, discount codes, confirmation and staff notification emails, and the donation request; warn about old settings with no equivalent. - Recover answer history from OnlineOPRRegQA first, falling back to the XML sources; send plain-text answers (model.AddRegAnswer does the JSON). - Carry over Required flags, option limits and sub-group/extra-value behavior; skip passport answers; never touch sub-groups, extra values or profiles of past registrants. - Print a "differences from the old registration" section in every run. - Validator: check for one person-info question and for settings the new screen would reject. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
It is a large, explicitly-untested data-migration script whose correctness hinges on model.* methods from an external, inaccessible dependency PR and on several author-acknowledged field-mapping assumptions, so it needs human review and a database pilot.
1 open finding
What changed in this PR
Adds a new RegistrationMigration/ tool that converts a TouchPoint Involvement from the legacy "Join Involvement" registration to the new "Registration Form", preserving settings, questions, and historical registrants/answers/payments. It is a preview-first admin PyScript (?orgid=N, &apply=1) plus a companion SQL checklist to validate the result afterward. The script is history-preserving only (it never mutates people, sub-groups, or extra values for past registrants) and prints a "Differences from the old registration" report on every run. It depends on registration helper methods added in an external (currently inaccessible) bvcms/bvcms PR, and per the description has not yet been run against a database.
Changes:
- Add
RegistrationMigration.py: translates legacyRegSettingXmlsettings andAskItemsquestions into the new schema, builds a person-info/donation question, and reconstructs each past enrollment as its own dated Registration (primary sourceOnlineOPRRegQA, falling back toRegistrationData/OnlineRegDataXML) with re-linked payments. - Add
ValidateRegistrationMigration.sql: a 14-point post-migration checklist (PASS/FAIL/INFO) covering registration type, questions, people/roster counts, answer/JSON validity, dollar reconciliation, and rejected settings combinations.
| File | Description |
|---|---|
RegistrationMigration/RegistrationMigration.py |
Core preview/apply migration logic for settings, questions, historical registrations, answers, and payment links. |
RegistrationMigration/ValidateRegistrationMigration.sql |
Informal post-migration validation checklist run against the converted involvement. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
| rows = q.QuerySql(""" | ||
| select Id as DatumId, Stamp, Data | ||
| from RegistrationData | ||
| where OrganizationId = %d and Completed = 1 and Id <> %d | ||
| """ % (org_id, exclude_datum_id or 0)) |

What
Adds
RegistrationMigration/: a preview/apply script and an SQL validator for converting an Involvement from the old Join Involvement registration to the new Registration Form, preserving registration history.RegistrationMigration.py-- run with?orgid=Nto preview,&apply=1to write.ValidateRegistrationMigration.sql-- 14 checks to run against the involvement afterward.What it converts
RegSettingXmlgroups): fees and extra-fee date, max fee, deposit, discount codes, timeout, submission/sign-in/membership rules, shell, closed/full state, confirmation and staff-notification emails, account code.OnlineOPRRegQAfirst, falling back toOnlineRegData/RegistrationDataXML. Payments are re-linked, never altered.Design points for review
model.AddRegAnswertakes plain text/list/dict and does the JSON encoding.Depends on
bvcms #5241 (
python-reg), which adds thePythonModelregistration methods this script calls. It will not run until that is deployed.Testing
Not yet run against a database. Pure logic was exercised offline (settings translation, answer preparation, person-info mapping, edge cases). Next step is a pilot on a copy of production data: preview a spread of involvements, apply one, run the validator, and diff before/after snapshots to confirm no current state changed.
Several field mappings (member-only status code, membership-ID sign convention, notification replacement codes) came from reading the code and should be confirmed first in the pilot.
🤖 Generated with Claude Code