Metadata Import Error

Hi everyone,

I have recently installed dhis2 2.30 in my ubuntu 19.10 server with tomcat9, postgresql 12 and openjdk8 for testing purposes. I am trying to import metadata which is exported from the other dhis2 server with same version i.e. 2.30. I did import the organization Units metadata, after the successful import the some icons are displayed as in screenshot below.

However it is not the big problem, while I tried to import the metadata for data set I get following error messages:

	Invalid reference [Xs8UQuJBVi2] (UserGroup) on object 11-1 Tubercluosis Dataset [a2JkM9Uvfa2] (DataSet) for association `userGroupAccesses`.
	Maximum length of property `shortName`is 50, but given length was 74.

How can I resolve this error? Please help me to import dataset metadata so that I can use it from data entry app.
Thanks in advance.

1 Like

HI @zerotwo,

About the error while importing metadata - you will have to change the shortName values to a max of 50 characters as the limit. Edit the values on the shortName field then try importing again and let us know what happens.

Best,
James.

Hi @jomutsani,

Is there any way to import the data set without editing the json file? The json metadata of dataset is exported from other dhis2 instance and I need to import the dataset metadata same as the previous dhis2 instance.
I tried altering the type of table attribute shortName to varchar(100) but It didn’t work.

Regards,
Sunil

1 Like

Hi @zerotwo,

Based on my knowledge, the shortname is set to a maximum of 50 characters and you can’t adjust it. You may have to edit the name to suit the system requirement.
I’m happy to hear from other members if they have a different workaround for this.

Best,
James.

1 Like