Skip to content

fix: lookup ID values in metadata items#1835

Merged
HendrikThePendric merged 2 commits into
masterfrom
fix/pivot-table-category-dimension
May 28, 2026
Merged

fix: lookup ID values in metadata items#1835
HendrikThePendric merged 2 commits into
masterfrom
fix/pivot-table-category-dimension

Conversation

@HendrikThePendric
Copy link
Copy Markdown
Contributor

@HendrikThePendric HendrikThePendric commented May 28, 2026

Implements DHIS2-21528

Relates to dhis2/event-visualizer-app#240 this PR is technically unrelated but both bugs cause the app to show ID string instead of display names, so they are functionally related.


Key features

  1. Try to lookup ID values in metaData.items

Description

This is a generic fix that assumes a text value could be an ID. If this is the case then the item name can be looked up in metaData.items. If the lookup fails then we assume it must be a genuine free text item.

Note about i18n changes

This PR contains significant changes to the POT file. Upon inspection, it turned out that even though these changes are unrelated to the current PR, these are in fact correct. So somehow the POT file on master was stale, which is a bit surprising because the i18n generation runs on pre-commit. I suppose if someone pushed to this repo with a broken git-hooks setup that could explain it.


Known issues

  • In theory it is possible that a text value is encountered which is supposed to be a regular "free text string" but it happens to exactly match the ID of one of the items in metaData.items. I think we can classify this as being a hypothetical case.

Screenshots

supporting text

Comment thread src/modules/response/event/default.js Outdated
@sonarqubecloud
Copy link
Copy Markdown

@HendrikThePendric HendrikThePendric merged commit 060b2e2 into master May 28, 2026
7 checks passed
@HendrikThePendric HendrikThePendric deleted the fix/pivot-table-category-dimension branch May 28, 2026 12:57
dhis2-bot added a commit that referenced this pull request May 28, 2026
## [29.5.2](v29.5.1...v29.5.2) (2026-05-28)

### Bug Fixes

* lookup ID values in metadata items ([#1835](#1835)) ([060b2e2](060b2e2))
@dhis2-bot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 29.5.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants