Closed aleksa-krolls closed 3 years ago
@aleksa-krolls the coach_name is being set using the query you typed there. But seems like it does not exist in the lookup table: https://www.openfn.org/projects/pd3yk4/runs/rwaga4y4
@lakhassane ok, so I tried to make one change... but then I reverted back to your latest version. Since you removed alterstate, I don't think this job is working. See latest run: https://www.openfn.org/projects/pd3yk4/runs/r3xjxpak
Then, please replace like L58 with the query returned value for Coach_A__r.CommCare_Ext_ID__c
(not Coach_A__c
).
https://github.com/OpenFn/grassroot-soccer/blob/c92988dd04817732597f79dc82b7105a4285aa11/jobs/upsertCoachSessionRegister.js#L55-L59
@aleksa-krolls I made the change and re-run the job: https://www.openfn.org/projects/pd3yk4/runs/rj5ja4ex
Request
We need to always link this Attendance record to a Coach, but sometimes
coach_name
is missing from state. https://github.com/OpenFn/grassroot-soccer/blob/6a94aa024ece0ba03f5980dd046fefbfc8b2f506/jobs/upsertCoachSessionRegister.js#L56Please add logic so that if
form.coach_name
is not defined, then...Then return the value of
Coach_A__c
in this mapping on L56...state
See LP for
GRS Salesforce Production
https://www.openfn.org/projects/pd3yk4/messages/mwbaqb4d To test, please run this^ on prod.expression
jobs/upsertCoachSessionRegister.js