← Back to team overview

dhis2-devs team mailing list archive

Ordering of category option names in the resource tables

 

Dear Devs,

I have run up against a strange issue. We are currently in the process of
transforming a lot of data elements from non-dimensional data elements to
ones with categories combos. We have previously done a large
matching exercise for this. I could not figure out why the names were not
matching, as we were pretty scrupulous. But, as it turns out, DHIS2 changes
the names when the resource tables are regenerated. The order which is
present in the category combo, does not seem to be respected.

This is the result of two SQL queries.

1) Before running the resource tables.

SELECT * FROM _categoryoptioncomboname where categoryoptioncomboname ~*('FP
Site')
448577;"(20-24, FP Site, Male)"
448588;"(FP Site, Female, 25-49)"
448596;"(FP Site, 50+, Female)"
448607;"(FP Site)"
...

2) Immediately after resource table regeneration.

SELECT * FROM _categoryoptioncomboname where categoryoptioncomboname ~*('FP
Site')
448577;"(FP Site, 20-24, Male)"
448588;"(FP Site, Female, 25-49)"
448596;"(FP Site, 50+, Female)"
448607;"(FP Site)"
...

Note that the category options are the same, but they order is different.

Is this a bug, or are the category names ephemeral?

Best regards,
Jason

Follow ups