Possible bugs in dashboardItems resource in web API

Hello team,

I have encountered strange bugs during development of android app for DHIS dashboard:

  1. Some of items at (api/dashboardItems) are orphan: They are not assigned to any dashboards. Example: https://apps.dhis2.org/demo/api/dashboardItems/KKBS6R9z51r

  2. Some of items do not contain “type” field and any values. Example: https://apps.dhis2.org/demo/api/dashboardItems/kLTvS9ExDwU

  3. Some if dashboard items reference resources which do not exist:

For example: https://apps.dhis2.org/demo/api/dashboardItems/Gj1qGfxysCm contains report: Kvg1AhYHM8Q which does not exist in list of https://apps.dhis2.org/demo/api/reports.

Is this normal behaviour? If yes, which rules should I follow when working with dashboard items?

Best Regards,

Araz

Hi Araz,

···

On Thu, Jun 11, 2015 at 11:21 AM, Araz Abishov araz.abishov.gsoc@gmail.com wrote:

Hello team,

I have encountered strange bugs during development of android app for DHIS dashboard:

  1. Some of items at (api/dashboardItems) are orphan: They are not assigned to any dashboards. Example: https://apps.dhis2.org/demo/api/dashboardItems/KKBS6R9z51r

Yes this must be some left-overs in the demo database from upgrades over the years. Please ignore this. I assume that in your local database you first load a dashboard, then the related items, so you should never read those orphaned items. I think its up the server / DHIS 2 to clean this up and the client should be robust enough to ignore them.

  1. Some of items do not contain “type” field and any values. Example: https://apps.dhis2.org/demo/api/dashboardItems/kLTvS9ExDwU

Yes again some stale outdated records from demo db, I will clean this up later.

  1. Some if dashboard items reference resources which do not exist:

For example: https://apps.dhis2.org/demo/api/dashboardItems/Gj1qGfxysCm contains report: Kvg1AhYHM8Q which does not exist in list of https://apps.dhis2.org/demo/api/reports.

Yes that report actually exist. I can see it has publicaccess set to none. You probably access it by using the admin user or some other user which does not have the ALL authority and hence cannot see it.

This is a general problem in terms of cascading sharing - i.e. sharing the dashboard without giving access to the items in the dashboard. This is a general problem we need to solve on the server side and something you can ignore for now on the client side.

regards,

Lars

Is this normal behaviour? If yes, which rules should I follow when working with dashboard items?

Best Regards,

Araz


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org

Hi Lars,
not sure if it’s a demo database issue. Not sure if it’s the same, but it’s at least similar to what I reported as a bug some time ago: https://bugs.launchpad.net/dhis2/+bug/1415434

Olav

···
  1. jun. 2015 kl. 23.36 skrev Lars Helge Øverland larshelge@gmail.com:

On Thu, Jun 11, 2015 at 11:21 AM, Araz Abishov araz.abishov.gsoc@gmail.com wrote:

Hello team,

I have encountered strange bugs during development of android app for DHIS dashboard:

  1. Some of items at (api/dashboardItems) are orphan: They are not assigned to any dashboards. Example: https://apps.dhis2.org/demo/api/dashboardItems/KKBS6R9z51r

Yes this must be some left-overs in the demo database from upgrades over the years. Please ignore this. I assume that in your local database you first load a dashboard, then the related items, so you should never read those orphaned items. I think its up the server / DHIS 2 to clean this up and the client should be robust enough to ignore them.