Duplicate "default" categoryOptionCombos -- applied as attribute on datavalues

Version 2.35.10
Build revision a3f6e14

In this instance we have, more than once, encountered the existence of “default” categoryOptionCombos in the database which gets assigned to the attributeOptionCombo value on the datavalues table.

There was a time we had a total of 5 defaults. One was the correct one. We addressed this and had the extraneous metadata removed. Now, 3 months later, it has happened again. We now have one extra default. The wrong metadata uid gets (seemingly) randomly assigned to datavalues when entering data using a data entry form. Some data is entered and is assigned the correct default attribute while other data is assigned the wrong default attribute. We can correct this when it happens (with a fair amount of effort) but we would like to know why it happens so we can avoid it.

Would simply upgrading the DHIS version prevent this from recurring?

Hi Laura,

Which version are you using?

Also, what does this request return?



1 Like

Hi Jason… I noted the version in my post:
Version 2.35.10
Build revision a3f6e14

We cleaned up the extra default so now the api call only returns the sole proper value:

<metadata xmlns="http://dhis2.org/schema/dxf/2.0">
<categoryOptionCombo id="HllvX50cXC0">

Before we cleaned up the extra metadata there were 2 values… the second one was created on 10 January at ~16:00 and had lastUpdated data associated with a Superuser of the database. The user had been configuring category option groups and category option group sets around the time the “bad” default categoryOptionCombo was somehow generated… however I don’t think the timestamps were close enough to deduce that one modification affected the creation of the errant categoryOptionCombo… but maybe.

Thanks Laura! Did this resolve the current issue?

This is why it’s important to debug and test the scenario. If we have the steps to reproduce an issue, it makes it possible to determine the reason.


Hmm. Did the user happen to regenerate category option combinations as part of their process?

It sounds like you sorted it out, but you may also want to have a look at some metadata integrity queries we have developed here. Inside each of these files, you can find a “Details” query to run on your database. If there are any integrity issues, they will be returned by the query, otherwise the list query results will be empty.

The check for a “correct” default category option, category combo and category option combination are all there. This might help to uncover any other issues as well.

Best regards,


I got the same issue after upgrading from DHIS2 2.33.7 to 2.40.2. The data in new database references HllvX50cXC0, but my other default is being used. This renders my datasets blank when reviewing from the old database. How can someone resolve this?