← Back to team overview

dhis2-users team mailing list archive

Re: inport meta data to option set

 

Dear Knut

 

I have created option set and exported it in JSON. I then deleted the optionset and tried to import it. Below are the same errors I am getting with csv file. Never seems to be able to import members of the option set

 

Current user:

admin

Version:

2.17

Build revision:

17561

Build date:

2014-11-21 12:21

 

 

{"created":"2014-12-20T23:44:06.855+0000","optionSets":[{"id":"etvtSKUhoSZ","name":"prog","created":"2014-12-

20T23:42:20.447+0000","lastUpdated":"2014-12-20T23:43:21.551+0000","options":

[{"id":"v0DNS4VKf40","code":"g1","name":"George","created":"2014-12-20T23:43:07.726+0000","lastUpdated":"2014-12-

20T23:43:07.726+0000"},{"id":"Ghi9DN5UYfu","code":"t1","name":"Tom","created":"2014-12-20T23:43:21.550+0000","lastUpdated":"2014-

12-20T23:43:21.550+0000"}],"version":1}]}

 

Import summary

Import count

1 Imported

0 Updated

0 Ignored

Type Summary

Type      Imported             Updated              Ignored

OptionSet           1              0              0

Conflicts

Type      Element               Description

OptionSet           prog       Unknown reference to IdentifiableObject{id=0, uid='v0DNS4VKf40', code='g1', name='George', created=Sun Dec 21 01:43:07 CAT 2014, lastUpdated=Sun Dec 21 01:43:07 CAT 2014} (Option) on object IdentifiableObject{id=3, uid='etvtSKUhoSZ', code='null', name='prog', created=Sun Dec 21 01:42:20 CAT 2014, lastUpdated=Sun Dec 21 02:09:50 CAT 2014} (OptionSet).

OptionSet           prog       Unknown reference to IdentifiableObject{id=0, uid='Ghi9DN5UYfu', code='t1', name='Tom', created=Sun Dec 21 01:43:21 CAT 2014, lastUpdated=Sun Dec 21 01:43:21 CAT 2014} (Option) on object IdentifiableObject{id=3, uid='etvtSKUhoSZ', code='null', name='prog', created=Sun Dec 21 01:42:20 CAT 2014, lastUpdated=Sun Dec 21 02:09:50 CAT 2014} (OptionSet).

 

Regards

Simon Muyambo

 

 

From: Knut Staring [mailto:knutst@xxxxxxxxx] 
Sent: 19 December 2014 21:49
To: Simon Muyambo
Cc: Jason Pickering; dhis2-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Dhis2-users] inport meta data to option set

 

I think you need to have quotes aroudn any text strings, including the codes

 

On Fri, Dec 19, 2014 at 8:40 PM, Simon Muyambo <smmuyambo@xxxxxxxxx> wrote:

Dear Knut and Jason

 

Thanks for the advice. I have run some tests with unique codes but not sure what the error means

 

name,uid,code,option

"Colorsm",,1b,"Blue1"

"Colorsm",,2g,"Green1"

"Gendersm",,3f,"Female1"

"Gendersm",,4m,"Male1"

Import summary

Import count

2 Imported
2 Updated
0 Ignored

Type Summary


Type

Imported

Updated

Ignored


OptionSet

2

2

0

Conflicts


Type

Element

Description


OptionSet

Gendersm

Unknown reference to IdentifiableObject{id=0, uid='Ja0hb0d1XGK', code='Female1', name='Female1', created=Fri Dec 19 21:34:19 CAT 2014, lastUpdated=Fri Dec 19 21:34:19 CAT 2014} (Option) on object IdentifiableObject{id=0, uid='qvy5Iof8De3', code='3f', name='Gendersm', created=null, lastUpdated=null} (OptionSet).


OptionSet

Colorsm

Unknown reference to IdentifiableObject{id=0, uid='jPyLUhETxWH', code='Green1', name='Green1', created=Fri Dec 19 21:34:19 CAT 2014, lastUpdated=Fri Dec 19 21:34:19 CAT 2014} (Option) on object IdentifiableObject{id=0, uid='JGfUphTsLuk', code='2g', name='Colorsm', created=null, lastUpdated=null} (OptionSet).


OptionSet

Gendersm

Unknown reference to IdentifiableObject{id=0, uid='mJsHyly4UoH', code='Male1', name='Male1', created=Fri Dec 19 21:34:19 CAT 2014, lastUpdated=Fri Dec 19 21:34:19 CAT 2014} (Option) on object IdentifiableObject{id=0, uid='IxdnSBPyo9y', code='4m', name='Gendersm', created=null, lastUpdated=null} (OptionSet).


OptionSet

Colorsm

Unknown reference to IdentifiableObject{id=0, uid='pSmhTjz0yIS', code='Blue1', name='Blue1', created=Fri Dec 19 21:34:19 CAT 2014, lastUpdated=Fri Dec 19 21:34:19 CAT 2014} (Option) on object IdentifiableObject{id=0, uid='MVHPvOLojgd', code='1b', name='Colorsm', created=null, lastUpdated=null} (OptionSet).

 

 

Regards

Simon Muyambo

 

 

From: Knut Staring [mailto:knutst@xxxxxxxxx] 
Sent: 19 December 2014 07:03
To: Simon Muyambo
Cc: Jason Pickering; dhis2-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Dhis2-users] inport meta data to option set

 

I think maybe you have to have something in the code field

On 19 Dec 2014 02:54, "Simon Muyambo" <smmuyambo@xxxxxxxxx> wrote:

Dear Jason

 

Please advise on the import of option set. I find option set is important but the members are not when I use CSV import. Any ideas? See example below


name,uid,code,option


Color,,,"Blue"


Color,,,"Green"


Gender,,,"Female"


Gender,,,"Male"

 

 

Regards

Simon Muyambo

 



__________ Information from ESET NOD32 Antivirus, version of virus signature database 10900 (20141218) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp

 

__________ Information from ESET NOD32 Antivirus, version of virus signature database 10900 (20141218) __________

 

The message was checked by ESET NOD32 Antivirus.

 

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature database 10905 (20141219) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com





 

-- 

Knut Staring

Dept. of Informatics, University of Oslo

Liberia: +231 770 496 123 or +231 886 146 381

Norway: +4791880522

Skype: knutstar

http://dhis2.org 

 

__________ Information from ESET NOD32 Antivirus, version of virus signature database 10905 (20141219) __________

 

The message was checked by ESET NOD32 Antivirus.

 

http://www.eset.com


Follow ups

References