EyeSeeTea / dataset-configuration-blessed

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

Tried deploying on latest #93

Closed troyel closed 6 years ago

troyel commented 6 years ago

Hia, I tried deploying the app on latestgors.nrc.no which is the daily copy of production, meta-data wise I think it was only missing the theme indicator group set which I added- but it got stuck here: datasetconfig 71 latestgors.PNG

tokland commented 6 years ago

@troyel could you send us by email the database dump to check the metadata?

tokland commented 6 years ago

I've identified the problem: when rendering grey fields for data elements in the category combo "CashType/Displacement/Sex", the component could not get its categoryOptionCombos. I checked this CC in the API (https://SERVER/api/categoryCombos/i8QPbiFNB2d.json), and indeed, that field was an empty array:

http://download.zaudera.com/public/i8QPbiFNB2d.json

I then re-saved the CC (some change is needed to force a re-save, like a change of the name) and now the categoryOptionCombos are there as usual:

http://download.zaudera.com/public/i8QPbiFNB2d-postsave.json

And now the grey fields render fine. Any idea why would this CC lack its COCs? This should not happen, but somehow it did, so I'll make a minor change in our code so it does not fail (it will just render no checkbox, which will serve as a signal that something is wrong with the CC).

(cc @adrianq)

tokland commented 6 years ago

This same problem is present in 7 more category Combos:

$ curl -sS -u "USER:PASSWORD" "https://SERVER/api/categoryCombos.json?fields=id,name,categoryOptionCombos[id]&paging=false" | jq -r '.categoryCombos[] | select(.categoryOptionCombos | length == 0) |.name
Cash Type
Cash Type / Head of Household
Construction Type (2018)
Infrastructure Type
Sanitation NFI (WASH)
Shelter Contribution Type
Water NFI (WASH)
troyel commented 6 years ago

Hum - might be I need to generate resource table. Will send new DB dump tomorrow - lets see if we have the same issue.

tokland commented 6 years ago

The DB dump still has the missing cocs, but running this maintenance task is enough: Data Administration -> Maintenance -> Update category option combinations -> [Perform maintenance]

3