← Back to team overview

dhis2-devs team mailing list archive

CSV import of data elements with some shortnames >50 characters - total failure (2.26)

 

Hi

I've just had an error event during DE CSV import, and I'm not sure if it
is a bug or some kind of design:

1.
I had a CSV file with 40 new data elements - what I did no know was that a
few of them had shortnames longer than 50 characters.

2.
I imported the file after setting "Reference mode" to "Deny invalid
references".  This "Reference mode" is not described anywhere I've seen
(not in the User manual at least), but from the name it seemed reasonable
to assume that it was designed to drop e.g. any invalid catcombouid or
optionset uid references - either by ignoring the whole row or by dropping
the invalid reference value.

3.
The import summary (attached) stated that 38 data elements had been created
and 2 ignored. The "Conflict" part is a bit gobblygook as usual, but the
reference to "shortname...." made it clear what the conflict was.

Based on this summary, I obviously expected 38 new data elements to have
been created.

4.
That was NOT the case - not a single new data element had been created, so
all 40 failed (I checked first in the UI and then in the database itself).
So the import summary code is buggy.

5.
After shortening the offending shortnames, I re-imported the file using
exactly the same setup, and the import summary showed 40 data elements
created with 0 ignored and 0 conflicts.

This time the 40 new elements HAD been created.

Whereas there's obviously some buggy code in relation to the import summary
(reporting 38 created when 0 had been created), the question is what
exactly this "Reference mode" is supposed to do. QUESTION:

Does "Deny invalid references" means that all imported objects will be
ignored if one or more have an invalid reference, and does "Reference" in
this case mean ANY field value in ANY row that causes a conflict?

Or is it supposed to only cause INVALID objects to be ignored?

I would like clarification on this, to determine if this is one or two bugs

Regards
calle

*******************************************

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@xxxxxxxxx

Skype: calle_hedberg

*******************************************