Skip to content

Hardcoded English tree rank names in localityPinFields break GEOLocate for non-English geography trees #8323

Description

@grantfitzsimmons

Describe the bug
When a Specify database uses non-English geography tree rank names (e.g., French: Pays instead of Country, Région instead of State, Département instead of County), the WorkBench GEOLocate dialog does not receive country/state/county data so only the locality name field is populated. The geography fields are silently dropped during data extraction.

Image

On the demo fish database (which uses English rank names), the country/state/county fields work correctly, confirming that the hardcoded rank names are the cause.

To Reproduce
Steps to reproduce the behavior:

  1. Use a Specify database where the Geography tree has non-English rank names (e.g., Pays, Région, Département instead of Country, State, County)
  2. In the Workbench, map columns to the geography tree ranks
  3. Fill in the geography columns with real values, and add fake values for latitude1/longitude1 to work around Issue Catalog Number Formatter #1
  4. Click "GEOLocate"
  5. Observe that only the locality name field is populated and country, state, and county are empty

Expected behavior
The country, state, and county fields in the GEOLocate dialog should be populated regardless of what the tree rank names are called in the database. The system should dynamically resolve the available geography ranks rather than relying on hardcoded English names.

Additional context
Root cause: In config.ts (lines 158-162), the localityPinFields array hardcodes English tree rank names:

pathsToFields: [
['Locality', 'localityName'],
['Locality', 'latitude1'],
['Locality', 'longitude1'],
['Locality', 'latitude2'],
['Locality', 'longitude2'],
['Locality', 'latLongType'],
['Locality', 'latLongAccuracy'],
['Locality', 'geography', '$Country', 'name'],
['Locality', 'geography', '$State', 'name'],
['Locality', 'geography', '$County', 'name'],
],
},

In wbLocalityDataExtractor.ts, matchLocalityPinFields() compares the actual mapping paths (which use the database's real rank names) against these hardcoded paths via filterSplitMappingPaths(). Since the rank names don't match, the geography fields are excluded from localityColumns and never passed to the GEOLocate dialog.

Metadata

Metadata

Assignees

No one assigned

    Labels

    2 - WorkBenchIssues that are related to the WorkBench

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions