2.32 Metadata dependency export exports everything--any workarounds?

I’ve already raised this issue on Jira though it hasn’t gained any traction and doesn’t look like it will be resolved before 2.33 release date. https://jira.dhis2.org/browse/DHIS2-7281 (votes appreciated).

Does anyone have any tips/tricks on how to manage extracting the necessary object data from an entire metadata dependency export?

My first guess is to load a DB dump into a 2.30 or 2.31 version and try there where the metadata dependency still works as expected.

1 Like

Hi Chase,

I agree that it’s very surprising this bug hasn’t been fixed, since it completely breaks one of the most important export features. (I noticed this bug shortly after the release of 2.32, but to my shame didn’t log it on Jira.) I’ve added my vote!

It looks like it’s just the user interface that’s broken, and that you can still do dependency exports via the API. Although you’re probably familiar with the API, I’ll set out full instructions below, in case others need to use this:

If you paste the following into your browser, it should download the appropriate dataset or program:
[your server URL]/api/dataSets/[UID of dataset]/metadata.xml?download=true

An example for the Play Demo site:
https://play.dhis2.org/2.32.1/api/dataSets/lyLU2wR22tC/metadata.xml?download=true

Within this URL, if you want to download a program instead of a dataset, just replace ‘dataSets’ with ‘programs’ ; if you want JSON instead of XML format, just replace ‘.xml’ with ‘.json’.

You can find the UID (“Id”) of a dataset or program by finding it within the list of datasets/programs in the ‘Maintenance’ app, and then selecting ‘Show details’ from the ‘Action’ menu on the right (three dots).

Cheers, Sam.

2 Likes

@SamuelJohnson and @chase.freeman, Just FYI I’ve given this bug a very high importance and I’m chasing it down with the developers. We’ll aim to have it in for 2.33 release.

2 Likes

Hi @Scott,

That’s great news, many thanks for such a quick response. :slight_smile:

Will you be able to back-port the fix to 2.32? (I’m guessing it’s just a minor UI fix, since the API seems to be working fine.)

Thanks again, Sam.

2 Likes

Thanks @SamuelJohnson, I did end up just going the API route! Thank you for documenting this for others that may come across this until it is fixed.

@Scott Thank you for the urgency!

Best to all,

Chase

1 Like

Hi! Just to follow up on this issue, we did fix it in 2.32 and 2.33, so it will work correctly in next patches for those versions. Thanks for reporting and finding work-arounds!

1 Like

Gintare, thank you!!

1 Like