iMMAP / ngm-reportDesk

The workdesk for ReportHub
0 stars 0 forks source link

RH AF FSAC Update Metadata #63

Closed rafinkanisa closed 2 years ago

rafinkanisa commented 2 years ago

Is your feature request related to a problem? Please describe. As the FSAC has updated all of the metadata for 2022, we'll have to update all of the submitted report data from Jan 2022 according to the given list. There are still some old activity which we could update the metadata but missed to update previously. The CVWG also would like to have the grant type metadata to be filled.

Describe the solution you'd like Update all of the metadata for FSAC activity

Acceptance Criteria

Describe alternatives you've considered No alternatives

Additional context Add any other context or screenshots about the feature request here.

fakhrihawari commented 2 years ago

Script:

db.beneficiaries.find({ admin0pcode: "AF", report_year: 2022, cluster_id: "fsac", activity_type_id: "livelihood_support", activity_type_name: "Livelihood Support", activity_description_id: "livelihood_support_cash_for_work", activity_description_name: "Cash for Work", _id: ObjectId('621f68ee33a9ebb323bfed71') })
db.beneficiaries.update({ admin0pcode: "AF", report_year: 2022, cluster_id: "fsac", activity_type_id: "livelihood_support", activity_type_name: "Livelihood Support", activity_description_id: "livelihood_support_cash_for_work", activity_description_name: "Cash for Work", _id: ObjectId('621f68ee33a9ebb323bfed71') }, { $set: { "transfer_category_id": "household", "transfer_category_name": "Household", "grant_type_id": "conditional_unrestricted", "grant_type_name": "Conditional, Unrestricted", indicator_id: "no_of_shock_affected_and_vulnerable_natural_disaster_affecteds_people_affected_by_covid_19_and_food_insecure_ipc_phase_3_and_4_people_women_men_and_children_of_all_ages_who_receive_adequate_livelihoods_assistance_in_a_timely_manner.", indicator_name: "# of shock affected and vulnerable (natural disaster affecteds, people affected by COVID-19, and food insecure IPC phase 3 and 4 people) women, men and children of all ages who receive adequate livelihoods assistance in a timely manner." } }, { multi: true });
db.beneficiaries.find({ admin0pcode: "AF", report_year: 2022, cluster_id: "fsac", activity_type_id: "food_assistance", activity_type_name: "Food Assistance", activity_description_id: "food_assistance_cbt", activity_description_name: "Food Assistance - CBT", indicator_name: "# of shock affected and vulnerable (IDPs, returnees, refugees, natural disaster affecteds, people affected by COVID-19, and seasonaly food insecure IPC phase 3 and 4 people) women, men and children of all ages who receive adequate food/cash responses in a timely manner.", grant_type_name: { $ne: "Unconditional, Unrestricted" }}).count()
db.beneficiaries.update({ admin0pcode: "AF", report_year: 2022, cluster_id: "fsac", activity_type_id: "food_assistance", activity_type_name: "Food Assistance", activity_description_id: "food_assistance_cbt", activity_description_name: "Food Assistance - CBT", indicator_name: "# of shock affected and vulnerable (IDPs, returnees, refugees, natural disaster affecteds, people affected by COVID-19, and seasonaly food insecure IPC phase 3 and 4 people) women, men and children of all ages who receive adequate food/cash responses in a timely manner.", grant_type_name: { $ne: "Unconditional, Unrestricted"}}
,{ $set: { "grant_type_id": "unconditional_unrestricted", "grant_type_name": "Unconditional, Unrestricted" } },{multi:true}
);
rafinkanisa commented 2 years ago

You can try on DEV using the most recent DB backup

fakhrihawari commented 2 years ago

Updated on DEV

rafinkanisa commented 2 years ago

Done check. Can go to the PROD Don't forget to update also the csv for activities

fakhrihawari commented 2 years ago

Updated on PROD