IFRCGo / go-frontend

MIT License
21 stars 5 forks source link

[PROD] Start date of Emergency page showing incorrectly #2893

Closed anamariaescobar closed 10 months ago

anamariaescobar commented 1 year ago

Issue

The "Start Date" of the Emergencies is not showing correctly, we have two different issues here:

@mmusori @tovari @szabozoltan69

tovari commented 1 year ago

Thanks @anamariaescobar. What should be the start date when there are no related appeal exists or not linked yet to the emergency? I assume then the start date from the FR should be applicable, right?

mmusori commented 1 year ago

@tovari I think we should have two dates here. 1. The start date of the disaster from the field report which is what we are currently pulling in and that solves the problem you stated above. 2. And then we need the response start date from Apple/Data warehouse.

tovari commented 1 year ago

@mmusori, @anamariaescobar, so I suggest to change the _startdate attribute of the _apiappeal table to the _APPstartDate attribute of the https://go-api.ifrc.org/api/Appeals (seems, currently it is _APDstartDate). This will change the start date to 2022-02-05 in our example. @szabozoltan69, I assume this will be reflected in both https://goadmin.ifrc.org/api/v2/appeal and the https://goadmin.ifrc.org/api/v2/event end points, right?

Regarding the date in the Emergency overview box, I'M not sure, if we want to show the appeal start date or the disaster start date?

szabozoltan69 commented 1 year ago

So we should use APP_startDate instead of APD_startDate (and the same for...endDate).

szabozoltan69 commented 1 year ago

Locally tested the ingest_appeals, worked fine.

szabozoltan69 commented 1 year ago

Deployed to Staging and Prod.

tovari commented 1 year ago

The appeal start date in the appeal and event api endpoint show now the start date of the parent appeal (the launch of the first appeal). E.g: "appeals": [ { "aid": "16472", "num_beneficiaries": 22600000, "amount_requested": "800000000.00", "code": "MGR65002", "amount_funded": "471770481.88", "status": 1, "status_display": "Closed", "start_date": "2022-02-05T00:00:00Z", "id": 3542, "translation_module_original_language": "en" } ],