OpenFn / grassroot-soccer

Grassroot Soccer CommCare-Salesforce integrations
https://openfn.github.io/grassroot-soccer/
0 stars 0 forks source link

Remove non-integers from Grade field in Pre Challenges and Post Challenges jobs #21

Closed daissatou2 closed 3 years ago

daissatou2 commented 3 years ago

Background, context, and business value

In a few of the state files for Pre Challenges and Post Challenges, the form.hidden_properties.grade field has an alphabetic character. In Salesforce the data type is integer. This causes the sync to fail: https://www.openfn.org/projects/pd3yk4/runs/rx85yw3n

The specific request, in as few words as possible

In the Pre Challenges and Post Challenges jobs, remove any non-integers from the form.hidden_properties.grade field to clean the data before mapping.

For example: '4a' should become '4' after the data cleaning.

See grade field in the mappings.

state.json

https://www.openfn.org/projects/pd3yk4/messages/mdbz8b49

adaptor

Salesforce

expression.js

https://github.com/OpenFn/grassroot-soccer/blob/master/jobs/upsertPreChallenges.js https://github.com/OpenFn/grassroot-soccer/blob/master/jobs/upsertPostChallenges.js

lakhassane commented 3 years ago

@daissatou2 I made the corrections. However I can't see gradein upsertPostChallenge.