Skip to content

Conversation

@henrikmv
Copy link
Contributor

@henrikmv henrikmv commented Sep 24, 2025

DHIS2-16869

This PR updates the handling of tracked entity type attributes in useTeiDisplayName.ts.
The function getTetAttributes now works with the TetAttribute type and extracts IDs from trackedEntityAttribute.id instead of a top-level id.

Changes:

  • getTetAttributes accepts TetAttribute[] instead of { id: string }[]
  • Attribute IDs are read from trackedEntityAttribute.id

@henrikmv henrikmv requested a review from a team as a code owner September 24, 2025 12:07
@henrikmv henrikmv changed the title fix: [https://dhis2.atlassian.net/browse/DHIS2-16869] Capture top-bar showing UID when editing attribute fix: [DHIS2-16869] Capture top-bar showing UID when editing attribute Sep 24, 2025
@github-actions
Copy link

github-actions bot commented Sep 24, 2025

@henrikmv henrikmv requested a review from Copilot September 25, 2025 10:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue where the capture top-bar was displaying UIDs instead of readable names when editing attributes. The fix updates the useTeiDisplayName.ts hook to properly handle the TetAttribute type structure.

  • Updated getTetAttributes function to work with TetAttribute[] instead of { id: string }[]
  • Changed attribute ID extraction to use trackedEntityAttribute.id path
  • Fixed variable naming consistency from teiNameDisplayInReports to teiNameDisplayInList

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@simonadomnisoru simonadomnisoru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@henrikmv henrikmv added testing and removed testing labels Oct 22, 2025
@henrikmv henrikmv added testing and removed testing labels Oct 22, 2025
@henrikmv henrikmv marked this pull request as draft October 23, 2025 08:20
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 New issue
1 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@henrikmv henrikmv marked this pull request as ready for review October 23, 2025 13:01
@henrikmv henrikmv added testing and removed testing labels Oct 27, 2025
@henrikmv henrikmv merged commit 2c52f39 into master Oct 27, 2025
38 of 41 checks passed
@henrikmv henrikmv deleted the hv/fix/DHIS2-16869_UidInContextSelectorOnEdit branch October 27, 2025 11:49
dhis2-bot added a commit that referenced this pull request Oct 27, 2025
## [104.6.2](v104.6.1...v104.6.2) (2025-10-27)

### Bug Fixes

* [DHIS2-16869] Capture top-bar showing UID when editing attribute ([#4381](#4381)) ([2c52f39](2c52f39))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 104.6.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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants