Set group country from country_code on save, and backfill - #916
Merged
Merged
Conversation
country was only filled in by the hourly groups:country job, and recent groups were found without it. It's kept for backwards compatibility (Metabase reports etc.), so set it (in English) whenever country_code is set, and backfill existing gaps. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…unknown codes - Group::countryNameForCode() is used by the mutator, groups:country and the backfill migration, so they agree: '' for an empty or unknown code (the job's existing behaviour) instead of null from the mutator, which made the column flip on every save/job run. - 'UK' (used by group CSV imports) maps to GB. - The backfill logs codes it can't map. - Locale test uses fr-BE, which has its own country names; fr fell back to English, so it couldn't catch a regression. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
This was referenced Oct 1, 2026
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.



Group::countryNameForCode()gives the English country name for a code (''if empty or unknown;UKis treated asGB).Groupsetscountryfrom it whenevercountry_codeis set.groups:countryand the backfill migration use the same lookup.countrywhere it is empty, logging any code it can't map.countryis kept for backwards compatibility with external reports; the app itself usescountry_code.🤖 Generated with Claude Code