WAIT: Accept "additional_age_groups" as a legacy age-group field identifier#1879
Open
maebeale wants to merge 1 commit into
Open
WAIT: Accept "additional_age_groups" as a legacy age-group field identifier#1879maebeale wants to merge 1 commit into
maebeale wants to merge 1 commit into
Conversation
Some production registration forms carry the pluralized identifier "additional_age_groups" on the additional age-group field. The code only ever recognized the canonical singular "additional_age_group", so on those forms the field rendered with no options, rejected submissions, and never tagged age groups — failing silently end to end. Lift the hardcoded age-group identifiers into PRIMARY/ADDITIONAL identifier- list constants (mirroring the sector legacy-coverage pattern) and accept the plural alias everywhere they resolve: dynamic options, submission validation, tagging, profile display, and the form-submission show page. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
🤖 PR, suggested 👤 review level: 📖 Read — small, contained identifier-recognition change
What & why
Production forms whose age field used the pluralized identifier
additional_age_groupssilently failed — the field rendered no options, rejected submissions, and never tagged age groups, because the code only knew the singularadditional_age_group.Approach
PRIMARY/ADDITIONAL_AGE_GROUP_FIELD_IDENTIFIERSconstants onFormField(mirroring the sector legacy-coverage pattern) and deriveDYNAMIC_FIELD_CATEGORY_TYPESfrom them, so both singular and plural resolve.EventHelperandPersonreference the shared constant;PublicRegistrationcollects age IDs across the identifier list.No migration — purely additive identifier recognition.