Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

[PROD] Emergency key figures bug #2914

Closed
jhenshall opened this issue Nov 6, 2023 · 6 comments
Closed

[PROD] Emergency key figures bug #2914

jhenshall opened this issue Nov 6, 2023 · 6 comments
Assignees
Labels

Comments

@jhenshall
Copy link

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.

@batpad
Copy link
Contributor

batpad commented Nov 6, 2023

@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!

@szabozoltan69
Copy link
Contributor

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

@samshara
Copy link
Member

samshara commented Nov 6, 2023

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

@batpad
Copy link
Contributor

batpad commented Nov 6, 2023

@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
Copy link
Member

samshara commented Nov 6, 2023

@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.

@szabozoltan69
Copy link
Contributor

Fixed via IFRCGo/go-web-app@4791abe

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants