Skip to content

Remove the primary_sector_single legacy field identifier - #2278

Draft
maebeale wants to merge 6 commits into
mainfrom
maebeale/remove-primary-sector-single
Draft

Remove the primary_sector_single legacy field identifier#2278
maebeale wants to merge 6 commits into
mainfrom
maebeale/remove-primary-sector-single

Conversation

@maebeale

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 3 Read 📖 removes one legacy identifier alias + its dev seed; small and contained

⚠️ Do not merge until prod form data is migrated from primary_sector_singleprimary_sector. Stacked on #2275.

Closes #2277

Why

#2275 made primary_sector the canonical primary-sector identifier and kept primary_sector_single as a temporary legacy alias so existing forms keep resolving. Once prod data is renamed to primary_sector, the alias is dead code.

Changes

  • FormField::PRIMARY_SECTOR_FIELD_IDENTIFIERS%w[primary_sector]
  • Drop the primary_sector_single "(legacy)" row from SmartFormFields
  • Delete the legacy_form_identifiers dev seed + rake task — no legacy identifiers remain

maebeale and others added 6 commits August 21, 2026 00:28
…ectors

Field identifiers now carry the name their behavior implies: the
single-select primary field is primary_sector (was primary_sector_single),
the multi-select additional field stays additional_sectors. Drop the legacy
lookups the old misnomer created — primary_sector meaning "additional",
plus primary_service_area / primary_service_area_single — now that the
stored data is consolidated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rename primary_sector_single → primary_sector in the specs that exercise
it, collapse the now-single-scheme professional-fields request spec, and
retire the legacy service-area test cases (converted to canonical
additional_sectors / primary_sector). Remove the legacy_form_identifiers
dev seed and its rake task.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The service-area field identifiers are retired; update the two comment
examples and the dashboard spec description to say "sector(s)" so no stale
terminology remains.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ield

Re-accept the older primary_sector_single identifier alongside the
canonical primary_sector so forms still carrying it keep resolving, and
document it on the Smart form settings reference page (the drift spec
requires every sector identifier to be catalogued).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…r_single

Deleting it was premature: primary_sector_single is still an accepted
legacy identifier for the primary sector field, so the dev seed that
demonstrates a form carrying a legacy identifier is still useful. Trim it
to that one surviving scheme (additional sectors and both age-group fields
were never renamed, so they stay canonical) and re-wire its rake task.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop the legacy alias now that primary_sector is the canonical primary
sector identifier. Merge only after prod form data is migrated from
primary_sector_single → primary_sector (see the connected issue). With no
legacy identifiers left, the legacy_form_identifiers dev seed and its rake
task go too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Base automatically changed from maebeale/consolidate-sector-fields to main August 21, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant