Import-Export API

Dear @software_developer20 @Gassim

I would like to draw your attention to the translation part of any metadata API. Particularly somehow when user add the translation, some previous translations got duplicated. Would it be possible to fix it? So before to update or store NAME, SHORT_NAME,DESCRIPTION properties via API DHIS should check if there is translation for the selected language and property?

As there is no control I have faced following problems as shown in the picture above. It could be easily fixed, but instead of providing the UID of the element it shows its index, which is not clear and if there are 1000 elements to be imported, the user should count each manually.

This message doesn’t provide anything clear or valuable as even have no reference to the DE\TEA\option etc.

Thank you and looking forward for the improvements

Regards,
Ulanbek

Hi @Ulanbek : would you be able to replicate this problem on one of our demo instances (https://play.dhis2.org/)?

When I tried, I got that files with duplicate translations were rejected, and that files containing new translations overwrote the existing ones (which is the expected behavior).

Hi @tzemp

Thank you for your reply. The issues with translations not happening often and have no idea when and how it may happen. But the fact is if that happened you will be unnoticed until you start sync or import metadata.
I have tried to reproduce but couldn’t.

Therefore I believe would be great just to provide UID of the element which cause an error, instead of providing index or just general message.

Also recently found that if username exists for the other user with same username but different UID the import/export app will fail without providing any explanations
image

so in order to find out what is going on the user have to check logs, if they have an access or knowledge where to check.

So would it be possible improve the import-export app so the error message could be seen in more understandable and clear way?

Thank you
Regards,
Ulanbek

1 Like