IFRCGo/go-frontend

[PROD] Emergency key figures bug

Closed this issue · 6 comments

Issue

I assume with the new update (which is great btw!) the key figures for emergencies now doesn't accept commas and just extracts the number before the comma.

For example for Libya (which I have now fixed), the backend looked like this:
Screenshot 2023-11-06 at 09 22 01

Which was rendered on frontend like this:
Screenshot 2023-11-06 at 09 21 43

Examples

Easy to fix per emergency by just removing the commas but flagging as bug because there may be numerous emergencies affected that are no longer actively worked on.

Expected behaviour

Should display the whole number. I wonder if this used to be a text field that is now a number field so others may be badly affected e.g. People affected = 1 million. Will this render? Will it just say one?

Impact

Questions of data quality for past emergencies and reputational impact.

Is there a workaround?

Remove commas for the figures of each emergency - fine for those currently being worked on but not for past emergencies.

@jhenshall thanks much for the report!

@samshara @udaynwa this does seem like a pretty critical issue - is it possible to look at it soon? Thanks!

Just one notice:

  • from backend the formatted numbers arrive. E.g in this case: https://go.ifrc.org/emergencies/6414/details
    in Inspector:
    kép
    we have pre-formatted numbers:
    kép
    (Why? Why they are not simply 9000000 or 4295092?)
    If it is by intention, then on frontend we should fix these:
    kép

@szabozoltan69 we should ideally store these as numeric fields and format / internationalize them as necessary.

@samshara am afraid it might not be so straightforward to do on the backend right now, especially since I think some Key Figures can be text - this would also involve a lot of migrating of past data.

Can we please fix this on the frontend for now and then discuss what the longer term solution should be, as this is a pretty critical bug?

@samshara am afraid it might not be so straightforward to do on the backend right now, especially since I think some Key Figures can be text - this would also involve a lot of migrating of past data.

Can we please fix this on the frontend for now and then discuss what the longer term solution should be, as this is a pretty critical bug?

@batpad we have fixed on the client. Thanks on the clarification.