osmcha-frontend icon indicating copy to clipboard operation
osmcha-frontend copied to clipboard

OSMCha shows numbers in filters instead of names

Open manoharuss opened this issue 8 years ago • 4 comments

I'm submitting a bug report

After we share a URL like https://osmcha.mapbox.com/filters?aoi=11f0d80c-19c2-430b-9756-df816fd782c8, the filter values turn into numbers instead of displaying the name. It would be easier to read if the names of the reasons are displayed.

Brief Description

image

What is the motivation / use case for this feature?

Would be great if name of the reason is displayed instead of the OSMCha index

When does this occur ?

When a URL is opened https://osmcha.mapbox.com/filters?aoi=11f0d80c-19c2-430b-9756-df816fd782c8

cc @kepta @batpad @willemarcel @planemad

manoharuss avatar Sep 25 '17 12:09 manoharuss

@manoharuss In order to reproduce the issue and make it more clear, following are the steps:

  • User saves custom filter in osmcha
  • Loads the filter and see integer value instead of label of the reason

@willemarcel I would like to hear your thoughts. If you feel this is an simple UI issue, I can take a dig at it.

/cc: @kepta @batpad

tridip1931 avatar Sep 25 '17 13:09 tridip1931

@tridip1931 I believe it is. As we save the id of the SuspicionReason and the API returns it, when loading a saved filter, we need to replace the id by the name of the Reason.

willemarcel avatar Sep 25 '17 14:09 willemarcel

I am not sure but the problem here is that it’s dificult to map the numeric id to the reason, because the backend doesn’t give me the numeric id to reason.( correct me if I am wrong about this @willemarcel)

kepta avatar Sep 25 '17 16:09 kepta

@kepta we have the Suspicion Reasons endpoint: https://osmcha.mapbox.com/api/v1/suspicion-reasons/

willemarcel avatar Sep 25 '17 17:09 willemarcel