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?)
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)
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?)
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@gmail.com 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)
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?)