OpenFn / unicef-cambodia

UNICEF Cambodia - Primero Interoperability
https://openfn.github.io/unicef-cambodia/
1 stars 2 forks source link

Remove leading 0s from Oscar village codes #28

Closed aleksa-krolls closed 4 years ago

aleksa-krolls commented 4 years ago

https://github.com/OpenFn/unicef-cambodia/blob/e1be71675faecef8842ef42ccc295bf6ac10b596/jobs/f2-j2-upsertCasesToPrimero.js#L322-L323

If Oscar village_code value for either field includes any leading 0s, remove these. In the below example (see run here)... Current output: "address_current_village_code": "02040202", Desired output:
"address_current_village_code": "2040202",

Context: Oscar village_code must always be 8 characters so they will add leading 0s if not. Primero cannot read village_code if it has leading 0s, but the field has no length constraints.

taylordowns2000 commented 4 years ago

Whoops. Closed in #29

aleksa-krolls commented 4 years ago

@taylordowns2000 hey fyi - this change was implemented in the wrong job. I think I fixed it though