OpenFn / unicef-cambodia

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

getReferrals operation on F2-J2 incorrectly returning "case not found" for cases in Primero #92

Closed daissatou2 closed 2 years ago

daissatou2 commented 2 years ago

Bug Report

Background, context, and business value

As discussed on the call, there is an issue with the getReferrals operation in F2-J2 that is causing the job to not find a case which we know exists in Pirmero.

For example, in this run, the upsertCases opertation succesfully found and upserted the case. But the getReferrals function is returning "case not found" for the same case. Both of these operations should succeed for this case.

Once resolved, you can retest today by rerunning the parent job. Use case with "external_id" = "b6723284-d555-4950-ad0d-32c3eeb4e053" or "case_id" = "b6723284-d555-4950-ad0d-32c3eeb4e053" After today, I would need to generate more test data in Oscar before you can test.

state.json

Primero: { "configuration": "Primero V2 Cambodia Demo API user", "data": "Run F2-J1 to generate state" }

Oscar (to generate state): { "configuration": "Oscar Staging (api only user)", "data": "Data will be generated from this job" }

expression.js

https://github.com/OpenFn/unicef-cambodia/blob/master/jobs/V2/f2-j2-upsertCasesToPrimero.js