DHIS2 - v2.42.6 organisation unit search bug

Hi All,

Recently, our team updated DHIS2 to v2.42.6 but there was an issue found when using Maintenance App → Organisation Unit search input: the organisation unit to be search is not found even though it exist and is assigned to user (selected under its data capture and maintenance section in Users App).

The issue seems to be happening by the endpoint: /api/organisationUnits?withinUserHierarchy=true&query=Country&fields=id,displayName&paging=false where withinUserHierarchy=true is returning empty everytime.

I found a PR (already merged) that solves this issue: fix: Correct organisation unit hierarchy search by netroms · Pull Request #25127 · dhis2/dhis2-core · GitHub. But I would like to understand if a DHIS2 instance upgrade needs to be performed or if there is a work around using my current instance version.

Thanks,
Ricardo Gómez

Hi @rgomez

Welcome back to the community! :tada: Thank you for taking the time to research the issue and providing the PR. In short, the PR is in the dhis2-core which means that this will require a DHIS2 instance upgrade.

This issue is tracked and reported here: DHIS2-22091 - perf: OU Metadata API special hierarchy filters cause serious performance issue. You can watch the ticket to receive updates; additionally, you’re welcome to add more context to how this is important to your implementation.

Here’s a quick explainer of what the ticket is about:

I’m adding the link to this discussion as well. Thank you!

@Gassim thanks for the support and taking the time sharing the explainer.

Daily operation with system is not blocked by this defect as the organisation unit tree can be used to manually search (this become a little bit complicated when many levels as well as organisation units are too big).

Is a release version already deployed with the fix? (Thinking about v2.46.7+).

Do you have an estimated time for release?

Thanks!

Hi again!

It seems that this is still work in progress with a number of PR to the core.. Please ‘watch’ each of these tickets to receive an updates:

  1. DHIS2-22091 - perf: OU Metadata API special hierarchy filters cause serious performance issue
  2. DHIS2-22383 - Org unit API: rootJunction=OR combines hierarchy and level limitations with filters, returning out-of-scope units

Additionally, it will be mentioned in the release notes when they are included.

Thanks!