Closed daissatou2 closed 3 years ago
@taylordowns2000 low priority, but a funny thing we noticed... perhaps something to discuss with @daissatou2 while it's fresh in her mind sometime this week.
Hey @daissatou2 , this is pretty strange. Seems like (at least) two separate things going on:
On #2
, I'm realising that we've made this CommCare_Case_ID__c
field non-unique. Is that intentional? Is there any reason that we'd want to load two different attendance records into Salesforce with the exact same CommCare_Case_ID__c
? While I investigate #1
, a quick change here might help out.
Also, FWIW, I couldn't find the second record in Salesforce—says it was deleted. Is that expected?
@taylordowns2000 on 2, the CommCare_Case_ID__c
should be unique. And yes, we deleted the duplicate record in SF.
Can I close this one since it's being addressed here? https://github.com/OpenFn/platform-app/issues/1384
Yes, go for it! (To confirm: did you implement that uniqueness constraint in Salesforce already?)
On Thu, Aug 5, 2021 at 12:15 PM daissatou2 @.***> wrote:
@taylordowns2000 https://github.com/taylordowns2000 on 2, the CommCare_Case_ID__c should be unique. And yes, we deleted the duplicate record in SF.
Can I close this one since it's being addressed here? OpenFn/platform-app#1384 https://github.com/OpenFn/platform-app/issues/1384
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OpenFn/grassroot-soccer/issues/26#issuecomment-893375104, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCUBLN4N7BOROFR3DZJDDDT3JXF3ANCNFSM5BSI2SMA .
Describe the bug
I was bulk reprocessing messages with the last failed runs in the GRS project and noticed that these two runs started at the same time: https://www.openfn.org/projects/pd3yk4/runs/rd76zgrp https://www.openfn.org/projects/pd3yk4/runs/r446zrnx
This resulted in duplicate records being created in Salesforce, even though we are using the
Upsert
function. They should have run one after the other. The first run should have created theAttendance__c
record, and the second one should have found and updated the existingAttendance__c
record. Instead, it looks like they ran at the same time so the second run didn't find the SF record from the first run because it had not finished creating it yet?To Reproduce
expression.js
Link to the job itself in Github: https://github.com/OpenFn/grassroot-soccer/blob/master/jobs/upsertCoachSessionRegister.js
state.json
https://www.openfn.org/projects/pd3yk4/messages/mrb9v6n4