onaio / reveal-frontend

WebUI for the Reveal epidemiological surveillance platform
8 stars 4 forks source link

Location Classification Seems to be failing on the Plan Template for Thailand Production #1661

Closed samkanga closed 3 years ago

samkanga commented 3 years ago

The location classification details on the WebUI is returning N/A but show a classification of the location on the monitoring page. An example of this is the case triggered plan whose screenshots are shown below: image

image

However, previous plans in the same location have picked the classification correctly. See the plan with ID: 17427738-cd64-405c-9a32-b235f1216166 here . See screenshot below:

image

Please check what may be causing the change in the classification.

ciremusyoka commented 3 years ago

@samkanga currently location classification is auto picked from the jurisdiction properties. The selected jurisdiction json for the plan returning N/A, is missing fi_classification (property with the location classification value).

{
    "type": "Feature",
    "id": "2d9a6e28-ee51-4d3d-8775-ee6bdbcb7612",
    "properties": {
        "status": "Active",
        "parentId": "c7576ab9-8189-468a-8f2e-912549973234",
        "name": "แม่ละโอ๊ด (5806040202)",
        "geographicLevel": 5,
        "version": 1,
        "externalId": "5806040202",
        "name_en": " (5806040202)"
    },
    "serverVersion": 1601625075170,
    "locationTags": [
        {
            "id": 2,
            "name": "Operational Area"
        }
    ]
}

The other plan with location classification and created out of same location, was created on 2021-08-09, which was before we deployed the feature for auto picking location classifications.

ciremusyoka commented 3 years ago

After running this PG the location now has fi_classification property.

{
    "type": "Feature",
    "id": "2d9a6e28-ee51-4d3d-8775-ee6bdbcb7612",
    "properties": {
        "status": "Active",
        "parentId": "c7576ab9-8189-468a-8f2e-912549973234",
        "name": "แม่ละโอ๊ด (5806040202)",
        "geographicLevel": 5,
        "version": 1,
        "externalId": "5806040202",
        "fi_classification": "B1",
        "name_en": " (5806040202)"
    },
    "serverVersion": 1601625078972,
    "locationTags": [
        {
            "id": 2,
            "name": "Operational Area"
        }
    ]
}
samkanga commented 3 years ago

Thank you @ciremusyoka I will check and revert.

samkanga commented 3 years ago

@ciremusyoka I can confirm this is now resolved. I will go ahead and close the ticket.