Big issue about data visualization in dashboard

Hi everyone,

A non admin user has created a dashboard and shares it with another user,. the other is able to see the dashboard name but when he clicks on it, he cannot see the data, He is getting an error that “(User: XXXXXX is not allowed to view org unit: gAl03JB2KF7). .

  1. Both users have “dashboard app” ticked as part of their user role.
  2. The data is drawn from org units that the user is assigned to. I have selected org units for both capture and analyze in user configuration app.

Screenshot from user configuration: Data is entered at facility level but the user works at a district level (and marked the district as data capture org unit),

The dashboard image.

When he clicks on the link [Open this item in Data Visualizer], he gets the error:

The ID shown in the error corresponds to a health facility, As I marked the district as data capture org unit and the referred health facility is below district, shouldn’t the user be able to see the data from all facilities below district?

Are we missing any steps in terms of configuration?

Thanks.

Please @fernando what is the dhis2 version that you are using?

Would it be possible that the second user facing an issue has browser cache that needs cleaning up? Did you try to use the Browser Cache Cleaner app?

Thank you!

Hi @Gassim,

Yes, I used the browser Cache Cleaner but it did not solve the problem… The DHIS 2 version is 2.36.6.

What is strange is that each user he has shared the dashboard with has the same error. He has shared the dashboard with three other users; all of them have the same error.

Thanks

Than you for giving it a try, did you try incognito? The org unit that these users seem not to have been given the details info is here: [yourInstanceURL]/api/organisationUnits/gAl03JB2KF7

Okay thank you we need to search for what’s causing this error. Please confirm whether or not you can see org unit gAl03JB2KF7 (or any of its parent orgunits) in each of these three users’ API details. You can use the API URL this way:
[instanceURL]/api/users/[userID]/?fields=organisationUnits,dataViewOrganisationUnits

If you look at the API URLs and can confirm that all users are assigned the OUs then please see if there are any errors in the Catalina.out log and if there are, please share it (without the sensitive information) here or in a PM.

Thank you!

Hi @Gassim,

The second API shows correct Org units the users are assigned to:

I have come to realize that the following ID belongs to an org unit to which the USERS were not assigned. Why this happens and how can I solve the problem?

Thanks.

Thank you @fernando! Is this organization unit ’ gAl03JB2KF7’ in the visualization? If it it is then the users must be assigned this organization unit to view the visualization. To solve this issue make sure that the visualization is only for the org units that the users have been assigned.

If it’s not in the visualization then maybe you should try Data Administration → Maintenance and select the following three:

Hi @Gassim,

I selected the three apps but the problem is not yet resolved. the organization unit ’ gAl03JB2KF7
is the encircled part in the image below,

It is not in the visualization; and it is not in the capture either, so users shouldn’t get the error. The users are assigned to GAZA and MANICA (with id="OSZ7WrQGw0w and id="Be0ZGIThdI5) and not SOFALA, But the error is saying that they are not allowed to view org unit gAl03JB2KF7 (SOFALA)

NB: It is pulling an org unit that they were not assigned to.

Thanks

@fernando this probably has to do with your database so for further investigation, it might be required to get a copy of the database to the coreteam. Please PM me if that is possible. Either way I’ll still ask for support to make sure whether we’ll need a copy or not. Thanks!

BTW,

To be 100% certain that the organisation unit isn’t in the visualization, you can check out the API:
[instanceURL]/api/36/visualizations/[visualizationID]?fields=organisationUnits

Hi @Gassim.

What visualizationID refers to in the following API?

[instanceURL]/api/36/visualizations/[visualizationID]?fields=organisationUnits

I think I misunderstood something about visualization. I mean the following part

Thanks

If you go to for example, https://play.dhis2.org/2.36.6/api/visualizations, you’ll see a list of visualizations and each one of these has an ID, so if I want more details about a specific visualization, I can get its id and go to:
https://play.dhis2.org/2.36.6/api/visualizations/theID

To easily find a visualization you can use the filter, https://play.dhis2.org/2.36.6/api/visualizations?filter=displayName:ilike:dropout and instead of dropout add the name of the visualization. :+1: