WFP-VAM / prism-app

PRISM is an interactive map-based dashboard that simplifies the integration of geospatial data on hazards, along with information on socioeconomic vulnerability

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: alerting area dropdown does not seem to work for Cambodia

laurentS opened this issue · comments

What happened?

The alerting menu includes a region selection dropdown which does not always show region names correctly. For instance, the screenshot below for Cambodia shows multiple regions under the same name (I picked 4 visible on the map to confirm they are indeed different areas).

image

Which country / deployment are you running?

This is for Cambodia, I have only checked that Mozambique works ok, I don't know about other countries.

Add a screenshot (if relevant)

This menu, to avoid confusion:
image

Thanks for catching this. The alert feature hasn't been deployed so I'm not surprised there are issues.

@ericboucher - we had talked about trying to unify the location list approach between the go to feature and others. If the go to feature has been implemented well, can we also utilize it here?

I think the underlying issue I'm seeing in various parts of the code related to selecting a location is that the shape of the geo data (admin areas level 0, 1, 2, names...) does not seem to be standardised across countries, which leads to the code in these dropdowns (and things like displaying the name of the location in a localised way) being overly complicated. I wonder if preprocesssing this data into one common shape could help simplify the code in a bunch of places?

@laurentS - I'm not sure what preprocessing into one common shape would entail. It sounds like you're suggesting a centrally managed single set of admin boundaries. That would usually work for WFP managed deployments down to admin 2, but I think would force some common definition of boundaries that is problematic for a long list of reasons and gets messy when we start getting to admin 3 level data. @ericboucher - sounds like we should think further on this to find a longer term solution. Let me know when you'd like to discuss

Related to #749