EyeSeeTea / dataset-configuration-blessed

Enhanced dataset manager Dhis2 app (blessed repository)
GNU General Public License v3.0
0 stars 1 forks source link

issue with default disaggregation #135

Closed EyeSeeTeaBotTest closed 6 years ago

EyeSeeTeaBotTest commented 6 years ago

dhis2

Data set created won't save

screenshot

adrianq commented 6 years ago

@ardhimanshu @ErikaMichelet can you please ask Ali.Alsakkaf2 to send the whole message (copy & paste) if this is still happening? It is a bit tricky for us to understand what is going on without the full message... From the next version you will be receiving this message instead of us...

adrianq commented 6 years ago

There was an error saving the dataset. Please contact the Dhis2 Administrator with the following information: Error: POST https://gors.nrc.no/api/26/metadata?mergeMode=MERGE&importStrategy=CREATE_AND_UPDATE

Request: { "categoryCombos": [ { "dataDimensionType": "DISAGGREGATION", "publicAccess": "r-------", "name": "default/default/Sex", "id": "MvH2lqAkXhR", "userGroupAccesses": [ { "access": "r-------", "id": "HcgpcsDZOWa" } ], "categories": [ { "id": "e1203lj5960" }, { "id": "eZ62z9CW6Tk" } ] } ], "categoryOptionCombos": [ { "categoryCombo": { "id": "MvH2lqAkXhR" }, "id": "MSskkcTAB5J", "name": "default, Female", "categoryOptions": [ { "id": "jhgKkucjZpg" }, { "id": "JDLJUK8KPvr" } ] }, { "categoryCombo": { "id": "MvH2lqAkXhR" }, "id": "MNlmzGRgmlu", "name": "default, Male", "categoryOptions": [ { "id": "jhgKkucjZpg" }, { "id": "cUqVhaqTJjj" } ] } ], "dataSets": [ { "publicAccess": "--------", "skipOffline": false, "categoryCombo": { "id": "GmXXE8fiCK5" }, "id": "lDckouch6eU", "name": "YEFM1806 (WORLD FOOD PROGRAM)", "code": "YEFM1806 Data Set", "dataElementDecoration": true, "notifyCompletingUser": true, "noValueRequiresComment": false, "description": "YEFM1806", "renderAsTabs": true, "periodType": "Monthly", "openFuturePeriods": 1, "expiryDays": 0, "dataSetElements": [ { "dataSet": { "id": "lDckouch6eU" }, "dataElement": { "id": "XrliiTtUIjn" }, "categoryCombo": { "id": "PU4tRQzstr4" } }, { "dataSet": { "id": "lDckouch6eU" }, "dataElement": { "id": "dtNkUrxZXFr" }, "categoryCombo": { "id": "PU4tRQzstr4" } }, { "dataSet": { "id": "lDckouch6eU" }, "dataElement": { "id": "y4gq9bilX95" }, "categoryCombo": { "id": "MvH2lqAkXhR" } } ], "dataInputPeriods": [ { "id": "alZCzKYDPaD", "period": { "id": "201712" }, "openingDate": "2017-12-30T21:00:00.000Z", "closingDate": "2019-03-29T21:00:00.000Z" }, { "id": "GEE0on0Yhcf", "period": { "id": "201801" }, "openingDate": "2017-12-30T21:00:00.000Z", "closingDate": "2019-03-29T21:00:00.000Z" }, { "id": "YhP9alSadOy", "period": { "id": "201802" }, "openingDate": "2017-12-30T21:00:00.000Z", "closingDate": "2019-03-29T21:00:00.000Z" }, { "id": "Gqo5obQ9KBT", "period": { "id": "201803" }, "openingDate": "2017-12-30T21:00:00.000Z", "closingDate": "2019-03-29T21:00:00.000Z" }, { "id": "PuxAuG5pT5V", "period": { "id": "201804" }, "openingDate": "2017-12-30T21:00:00.000Z", "closingDate": "2019-03-29T21:00:00.000Z" }, { "id": "AWYWfqXPZKO", "period": { "id": "201805" }, "openingDate": "2017-12-30T21:00:00.000Z", "closingDate": "2019-03-29T21:00:00.000Z" }, { "id": "L5xEZosArYb", "period": { "id": "201806" }, "openingDate": "2017-12-30T21:00:00.000Z", "closingDate": "2019-03-29T21:00:00.000Z" }, { "id": "bH9JqzSmoaD", "period": { "id": "201807" }, "openingDate": "2017-12-30T21:00:00.000Z", "closingDate": "2019-03-29T21:00:00.000Z" }, { "id": "B3FPqZvoBag", "period": { "id": "201808" }, "openingDate": "2017-12-30T21:00:00.000Z", "closingDate": "2019-03-29T21:00:00.000Z" }, { "id": "Kr5KpwaJDnu", "period": { "id": "201809" }, "openingDate": "2017-12-30T21:00:00.000Z", "closingDate": "2019-03-29T21:00:00.000Z" }, { "id": "U3CHMZbthRA", "period": { "id": "201810" }, "openingDate": "2017-12-30T21:00:00.000Z", "closingDate": "2019-03-29T21:00:00.000Z" }, { "id": "iNZWHjLPDxM", "period": { "id": "201811" }, "openingDate": "2017-12-30T21:00:00.000Z", "closingDate": "2019-03-29T21:00:00.000Z" }, { "id": "T35kPc8Qyb2", "period": { "id": "201812" }, "openingDate": "2017-12-30T21:00:00.000Z", "closingDate": "2019-03-29T21:00:00.000Z" }, { "id": "up6ksb7mUxw", "period": { "id": "201901" }, "openingDate": "2017-12-30T21:00:00.000Z", "closingDate": "2019-03-29T21:00:00.000Z" }, { "id": "PSy2hOZTL8x", "period": { "id": "201902" }, "openingDate": "2017-12-30T21:00:00.000Z", "closingDate": "2019-03-29T21:00:00.000Z" }, { "id": "VELrK9aXg5G", "period": { "id": "201903" }, "openingDate": "2017-12-30T21:00:00.000Z", "closingDate": "2019-03-29T21:00:00.000Z" } ], "userGroupAccesses": [ { "access": "r-------", "id": "HcgpcsDZOWa" }, { "access": "rw------", "id": "sx6OccTMlKp" }, { "access": "rw------", "id": "M9dPUWRdk4L" } ], "indicators": [ { "id": "TCszRoNIDY7" } ], "legendSets": [], "organisationUnits": [ { "id": "LHaJEZVO1tu" }, { "id": "xA6RRSUCCed" } ] } ] }

Response: { "importParams": { "importMode": "COMMIT", "identifier": "UID", "preheatMode": "REFERENCE", "importStrategy": "CREATE_AND_UPDATE", "atomicMode": "ALL", "mergeMode": "MERGE", "flushMode": "AUTO", "skipSharing": false, "skipValidation": false, "username": "Afrah.Alattas" }, "status": "ERROR", "typeReports": [ { "klass": "org.hisp.dhis.dataelement.DataElementCategoryOptionCombo", "stats": { "created": 0, "updated": 0, "deleted": 0, "ignored": 2, "total": 2 } }, { "klass": "org.hisp.dhis.dataelement.DataElementCategoryCombo", "stats": { "created": 0, "updated": 0, "deleted": 0, "ignored": 1, "total": 1 }, "objectReports": [ { "klass": "org.hisp.dhis.dataelement.DataElementCategoryCombo", "index": 0, "errorReports": [ { "message": "Property name with value default/default/Sex on object default/default/Sex [MvH2lqAkXhR] (DataElementCategoryCombo) already exists on object BWc6ykbbcwK.", "mainKlass": "org.hisp.dhis.dataelement.DataElementCategoryCombo", "errorCode": "E5003" } ] } ] }, { "klass": "org.hisp.dhis.dataset.DataSet", "stats": { "created": 0, "updated": 0, "deleted": 0, "ignored": 1, "total": 1 } } ], "stats": { "created": 0, "updated": 0, "deleted": 0, "ignored": 4, "total": 4 } }

tokland commented 6 years ago

We've detected the problem: on the disaggregation step, when a user creates a custom on-the-fly categoryCombo for some dataElement having the special default category, that category was still included in the union of categories (it should not). This has already been fixed and it's going to be included in the next release.

Important: Some created default/xyz categoryCombos should be fixed in gors. We have located the objects and we can do it for you. Can you confirm we can proceed? it's a simple fix.

ardhimanshu commented 6 years ago

Thanks. Some questions:

  1. What do you mean by "dataElement having the special default category, that category was still included in the union of categories" ? Can you give an example so we can be careful in future?

  2. Can you give example of "some created default/xyz categoryCombos should be fixed in gors"? Again - so that we can be mindful in future.

adrianq commented 6 years ago

Yes, sure...

Re 1, in the disaggregation step some data elements have the 'default' categoryCombo. The user decides to add a disaggregation level (for example 'Sex'). We were creating a new categoryCombo like this: 'default/Sex'. This is wrong as in this case we should use the CategoryCombo 'Sex' instead of 'default/Sex'. This is a corner case we didn't have under control. It is solved now and will be part of the next release.

Re 2, these are the ones we detected and are already solved: yXgvsbyvUit (default/Age) used in Dataset H00wCS4QO7a -> needs to be just "Age" BWc6ykbbcwK (default/default/Sex) used in Dataset BkTtUGsf8ic -> needs to be just "Sex" n4LQurF5B5C (default/Sex) used in Dataset IRRxDfmEueo, BSl9OXw7xkc -> needs to be just "Sex"

adrianq commented 6 years ago

As we haven't released this feature yet, we will have to review the latest disaggregation created. From Erika: 'Just that you know, it seems the category combos "default/" are back (and in use). One created by Laurence (Iran) and the other by Camilo (Colombia). Please let me know if I should ask them to stop creating and using it. And I am trying to create a disaggregation combining three categories:

Neither the category combo of the newest category created by me (settlement type) appears in the app. '