opencrvs / opencrvs-core

A global solution to civil registration
https://www.opencrvs.org
Other
85 stars 67 forks source link

System crash occurs while running the application when their browser’s default language as anything other than English #7470

Closed SyedaAfrida closed 2 days ago

SyedaAfrida commented 1 month ago

Bug description: System crash occurs while running the application when their browser’s default language as anything other than English

Steps to reproduce:

  1. Change your browser's language to anything other than english
  2. Run new Date('July 2024') in devtools console
  3. Observe an exception
  4. Login as j.campbell and open this link - https://register.farajaland-qa.opencrvs.org/performance/registrations?currentPageNumber=1&event=BIRTH&filterBy=by_time&locationId=NATIONAL_ADMINISTRATIVE_LEVEL&timeEnd=2024-08-13T20%3A59%3A59.999Z&timeStart=2024-05-31T21%3A00%3A00.000Z

Actual result: System crash occurs

Expected result: should work properly if default browser language is other than english. The backend responds with an object where one of the keys is “July 2024” that gets parsed by new Date() in the client code- { "total": 32, ... "month": "July 2024", ... "__typename": "EventMetricsByTime" }

Screenshot/ Recording:

image (4)

Tested on: https://login.farajaland-qa.opencrvs.org/?lang=en

Version: V1.6.0

eduffus commented 1 month ago

Added to 1.6 to fix but for cherry picking into a 1.5.1 hotfix as raised by Burkina Faso (they plan to go-live with v1.5).

SyedaAfrida commented 2 days ago

This bug is fixed Image