← Back to team overview

dhis2-devs team mailing list archive

Metadata importer: buggy behavior when importing unordered orgunits

 

Hi all,

we have found a strange behavior in the new metadata importer.

Let's create two related orgunits, "Project" (parent) and "Health Site"
(child), and export them using the new exporter which defaults to order by
'name'. The payload will contain "Project" first and "Health Site" later.

Then, if we import the file in another instance using the new importer, it
gives us the following:
1. Project orgunit is correctly imported.
2. Health Site orgunit is imported, but the "parent" field is left empty,
and also the path is wrong. In fact, it is created as another *root
orgunit!*

I don't know if the new importer expects ordered elements, but this
behavior is quite dangerous... We test the same file with old importer, and
it works fine.

You can find attached a payload that can be used with demo server (it hangs
from Sierra Leone orgunit).

Regards,

Víctor

Attachment: unorderedOrgunits.json
Description: application/json


Follow ups