← Back to team overview

dhis2-devs team mailing list archive

Re: Need to modify or regenerate the default categoryOptionCombo

 

Hi Mike,

this was an unfortunate bug which existed in the API at some point which
caused some trouble in various databases. Cleaning it up is a bit involved
if you have data for both default option combos and want to merge it. We
have an SQL script here with various commands which is helpful:

https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/fix-duplicate-default-category-option-combos.sql

regards,

Lars


On 1 March 2018 at 04:47, Mike Johnson <mjohnson@xxxxxxx> wrote:

> I have an instance on 2.27, but it was originally built in 2.24 and
> upgraded to 2.25 and 2.26.
>
>
>
> I need to regenerate my default categoryCombo. Somehow I have two
> categoryOptionCombos associated with the default categoryCombo (default,
> and “Cured”, which is an unrelated disaggregation from another
> categoryCombo).
>
>
>
> The only way I noticed this was that I was using the HISP Touch app, and I
> was seeing two input fields for each data element with default category
> combo.
>
>
>
> I have regenerated category option combos in the data administration app,
> I have cleared the app cache, changed public access to “rw------“,
> restarted the server, and pulled a few other things, but nothing seems to
> work. Is there any other way to manually remove this extraneous category
> option combo from the “default” category combo?
>
>
>
> Below is the metadata, if anyone is curious to take a look.
>
>
>
> Thank you!
>
> Mike
>
>
>
> *Mike Johnson, MSc* | MEQ Manager
>
> Monitoring, Evaluation & Quality Improvement | Partners In Health
>
> Email: mjohnson@xxxxxxx
>
> Mobile: +1 857-206-5246 <+1%20857-206-5246>
>
> Submit an MEQ data request
> <https://partnersinhealth.sharepoint.com/sites/meq/Lists/MEQ%20Request%20Form/NewForm2.aspx>
>
>
>
>
>
> <categoryCombo xmlns="http://dhis2.org/schema/dxf/2.0";
> created="2015-11-04T12:56:52.922" lastUpdated="2018-02-
> 28T22:11:57.151" name="default" href="https://_______
> /dhis/api/categoryCombos/gWY___" id="gWY___">
>
> <dataDimensionType>DISAGGREGATION</dataDimensionType>
>
> <displayName>default</displayName>
>
> <publicAccess>rw------</publicAccess>
>
> <externalAccess>false</externalAccess>
>
> <isDefault>true</isDefault>
>
> <skipTotal>false</skipTotal>
>
> <lastUpdatedBy id="Hq3___"/>
>
> <access>
>
> <read>true</read>
>
> <update>true</update>
>
> <externalize>true</externalize>
>
> <delete>true</delete>
>
> <write>true</write>
>
> <manage>true</manage>
>
> </access>
>
> <user id="Hq3Uq69cGEq"/>
>
> <categoryOptionCombos>
>
> <categoryOptionCombo id="q3kk___"/>  ## This is default
>
> <categoryOptionCombo id="UnxN___"/>  ## This is “Cured”, which I want to
> remove
>
> </categoryOptionCombos>
>
>
>
> <categories>
>
> <category id="QNCD___"/>  # This is default
>
> </categories>
>
> </categoryCombo>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
lars@xxxxxxxxx
http://www.dhis2.org <https://www.dhis2.org/>

References