Unknown network error when a user is assigned a large number of organisation units

Hi everyone,

In DHIS2 v42 Capture, I have a user with approximately 5300 facility organisation units assigned in organisationUnits.

dataViewOrganisationUnits and teiSearchOrganisationUnits are assigned to the root organisation unit (Egypt).

The user is intentionally not assigned to the root organisation unit in organisationUnits because the requirement is to show only the assigned facilities.

Observed behavior:

  • Firefox eventually loads the organisation units, but after a long delay.

  • Chrome shows: “Error: An unknown network error occurred”

The failing requests are:
GET /api/42/organisationUnits/{uid}?fields=displayName,path,id

The organisation unit IDs exist and can be retrieved successfully through the API.

Has anyone experienced limitations or performance issues in Capture when a user is directly assigned several thousand organisation units?

I also found Jira DHIS2-19164 describing similar performance issues with large numbers of organisation units, although it was reported for the Data Entry app.


Hi

Sorry to hear you’re facing this issue. We need to make sure the user has these OUs assigned in both the Users app as well as the Program metadata configuration, could you please double check that both are assigned?

Thanks!

Hi @AL-Gassim,

I have verified that the OUs are assigned in both the Users app and the Program configuration. I have attached a GIF demonstrating this.

The issue only occurs when the user is assigned a large number of OUs. However, my admin account has access to all organisation units, and this issue does not occur.

Thank you.

Hi @rehabm

Thanks for the GIF… I see in the GIF only the configuration from the User’s app, but what about the ‘Access and Sharing’ configuration of the program?

This proves that the issue is simple. We need to figure out what’s the sharing setting that’s missing from those accounts. If it’s not occurring in the admin account then it’s probably an authority/assigning issue.

Thank you!