← Back to team overview

dhis2-users team mailing list archive

Re: Metadata Length of ID field validation schema checks on import of XML file

 

Hi David,

yes it is supposed to read "Exactly 11 characters". Will update it.

regards,

Lars

On Fri, Nov 6, 2015 at 5:29 AM, Morten Olav Hansen <mortenoh@xxxxxxxxx>
wrote:

> Hi
>
> As far as I know, the length has always been 11. Are you sure they were
> generated by DHIS2? we didn't validate before, so if you made them
> outside.. they would be allowed in earlier versions
>
> And yes, it will only generate 11 char UIDs (/api/system/id?limit=10 to
> get new ones)
>
> --
> Morten
>
> On Fri, Nov 6, 2015 at 11:05 AM, David Hagan <david.hagan@xxxxxxxxxxxxx>
> wrote:
>
>> Good morning all,
>>
>> I’m transferring organisation units between two instances of version 2.21
>> (XML Metadata import).
>>
>> I received two ‘ignored’ OrgUnits on a Dry Run import where the error
>> message indicated *“Validation Violations:
>> [ValidationViolation{property=‘id’, message=‘Allowed range for length [11,
>> 11], length is 10’, value=w6pbH5HjDD}]”*
>>
>> On further investigation, I noted the developer manual indicates that a
>> UID is a “Stable identifier. *Max 11 char.* Will be generated by system
>> if not specified.”
>>
>> These were system generated ID’s (from a previous version 2.18), but it
>> looks like the import schema check is specified as 11 char only (i.e. won’t
>> accept a 10 char ID).
>>
>> Any insights? (We can get around it by generating a new UID of course for
>> the object in question I suppose, but are the new versions of DHIS2
>> guaranteed to only generate 11 Char UIDs?)
>>
>> Cheers
>>
>> David
>>
>>
>>
>> _______________________________________________
>> 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
>>
>>
>
> _______________________________________________
> 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
>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
http://www.dhis2.org <https://www.dhis2.org>

References