-
Notifications
You must be signed in to change notification settings - Fork 18
update kobo job code example #685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| getSubmissions($.data.formId, { | ||
| query: { end: { $gte: `${$.cursor}` } }, | ||
| }).then(state => { | ||
| const { name, formId } = state.references.at(-1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have a comment here explaining this line. Like Lookup each form's id from the previous state
I also wish we had an easier answer to this. After the each it's always super hard to chain functionality based on the item under iteration. I guess this works but I wish we ad something more elegant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I totally agree, every time i write that code my eyes squint a little and i get ptsd from my previous job writing training having to explain why references.at(-1) 😮💨
|
@josephjclark thanks for the feedback I have updated the readme, please have another look |
adaptors/kobotoolbox.md
Outdated
| // set the cursor to use for this run | ||
| cursor($.lastEnd || $.manualCursor || '2020-11-20T14:32:43.325+01:00'); | ||
|
|
||
| // set the cursor for the next run" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@josephjclark i have removed ". Done ✅
Short Description
The
KoboToolboxjob code example in overview page was outdated. This PR updates the job code to latest and greatest patternCloses #672
AI Usage
Please disclose how you've used AI in this work (it's cool, we just want to
know!):
You can read more details in our
Responsible AI Policy