← Back to team overview

dhis2-users team mailing list archive

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

 

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

Follow ups