Skip to content

fix(doctors): store stable gender values instead of localized labels - #1137

Open
raulriera wants to merge 1 commit into
masterfrom
fix/doctor-gender-values
Open

fix(doctors): store stable gender values instead of localized labels#1137
raulriera wants to merge 1 commit into
masterfrom
fix/doctor-gender-values

Conversation

@raulriera

Copy link
Copy Markdown
Member

Summary

  • The gender select stored the translated, downcased label, so the database value depended on the locale active at save time ('hombre'/'mujer' under es, 'masculino'/'feminino' under pt) — the gender === 'mujer' special-case in Doctor#fullname is existing fallout from this
  • Options now come from Doctor::GENDERS (male/female) with translated labels only; the show page translates known values and displays legacy ones as stored
  • A follow-up data migration for existing localized rows is tracked in the cleanup task list

Test plan

  • Red test: form under es lacks stable option values
  • Green after fix
  • Full suite passes (523 runs, 0 failures)

The gender select used the translated, downcased label as the stored
value, so the database value depended on the locale active at save
time (hombre/mujer, masculino/feminino) - the 'mujer' special-case in
Doctor#fullname is existing fallout. Store male/female from a model
constant, translate only the label, and translate known values on the
show page (legacy values display as stored).
@github-actions github-actions Bot added the fix A bug has been resolved label Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A bug has been resolved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant