Skip to content

fix: respect user display name preference across metadata queries#3701

Draft
BRaimbault wants to merge 3 commits into
masterfrom
fix/metadata-name-translations
Draft

fix: respect user display name preference across metadata queries#3701
BRaimbault wants to merge 3 commits into
masterfrom
fix/metadata-name-translations

Conversation

@BRaimbault

Copy link
Copy Markdown
Collaborator

Description

Several components ignored the user's Display property setting and always fetched metadata using displayName. This PR threads nameProperty (the transformed API field name: displayName or displayShortName) from useCachedData() through to all relevant queries.

Key changes:

  • helpers.jsanalysisFields() now accepts nameProperty, fixing dimension item names in saved map configs
  • ThematicDialog — was passing the raw setting value (name/shortName) to DataDimension.displayNameProp, which expected the API field name
  • OrgUnitsProvider, TrackedEntityPopup, EventLayer, TrackedEntityLayer — queries now use the correct API field name
  • LayerLoader — passes nameProperty from context to loaders; eventLoader no longer re-computes the name → displayName transform that CachedDataProvider already performs
  • MapView — sources nameProperty directly from context instead of the raw user setting

Not changed (intentionally): programStage, legendSet, organisationUnitLevel, and optionSet remain hardcoded to displayNamedisplayShortName is not available on these types.


Quality checklist

Add N/A to items that are not applicable.

  • Dashboard tested
  • Cypress and/or Jest tests added/updated N/A
  • Docs added N/A
  • d2-ci dependencies replaced N/A
  • Tester approved (name)

@dhis2-bot

Copy link
Copy Markdown
Contributor

🚀 Deployed on https://pr-3701.maps.netlify.dhis2.org

@dhis2-bot dhis2-bot temporarily deployed to netlify June 26, 2026 10:32 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 26, 2026 10:55 Inactive
@sonarqubecloud

Copy link
Copy Markdown

@dhis2-bot dhis2-bot temporarily deployed to netlify June 26, 2026 13:19 Inactive
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.

2 participants