OpenFn / grassroot-soccer

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

Implement `removeAccents` function on three job #46

Closed daissatou2 closed 1 year ago

daissatou2 commented 1 year ago

Describe the bug

2 weeks ago we discovered that the accent marks on the message for the Upsert Register Participant job were causing the run to fail with a Bad Request 400. We are now seeing this same issue for other jobs. Please add the removeAccents function that was implemented in this GH issue to the jobs below:

  1. Pre challenges
  2. Post challenges
  3. Attendance

To Reproduce

  1. Here is a link to a failed run on OpenFn.org which is indicative of the bug:

Pre challenges: https://www.openfn.org/projects/grs-integrations/runs/064f75ad-d1b6-7eaa-a59a-1cf667d59f3f Post challenges: https://www.openfn.org/projects/grs-integrations/runs/064f762d-1f03-73eb-88b8-c02b421e6e26 Attendance: https://www.openfn.org/projects/grs-integrations/runs/064f7441-da0f-703a-9004-8d071819076b

expression.js

Link to the job itself in Github.

Pre challenges: https://github.com/OpenFn/grassroot-soccer/blob/master/jobs/upsertPreChallenges.js Post challenges: https://github.com/OpenFn/grassroot-soccer/blob/master/jobs/upsertPostChallenges.js Attendance: https://github.com/OpenFn/grassroot-soccer/blob/master/jobs/upsertAttendanceNonSkillz.js

state.json

{
  "configuration": ["SEE LAST PASS: 'GRS Salesforce Production'"],
  "data": { "see below for each job},
}

Messages: Pre challenges: https://www.openfn.org/projects/grs-integrations/messages/064f75ad-c90d-7a69-9266-14962b1b2c9d Post challenges: https://www.openfn.org/projects/grs-integrations/messages/064f762d-154d-799f-a044-9f223f76f581 Attendance: https://www.openfn.org/projects/grs-integrations/messages/064f7441-d091-7df6-b45a-4fe1f096b69b

Expected behavior

The jobs should run successfully.

To test/resolve

  1. After the desired output is working locally (from the CLI), please [push commits to master || open a pull request].
  2. [Please test the change on OpenFn.org by re-running the links above and confirming success.]
mtuchi commented 1 year ago

@daissatou2 i have added the improvements #47, but i need to test these changes let's sync when your online today