OpenFn / ConSoSci

ConSoSci jobs to integrate: BNS and NRGT Kobo Toolbox forms and other WCS/Partner Kobo form integrations.
https://openfn.github.io/ConSoSci/
4 stars 3 forks source link

`Trillion Trees` Kobo Monitoring Job not loading the `Country` field #192

Closed jayesse closed 1 year ago

jayesse commented 1 year ago

Describe the bug

The Trillion Trees Kobo Monitoring Job is not loading some fields when the KM2. Fetch Kobo Forms Data job runs.

The reported fields are: ~Languages~ (oops. bad issue. this field was already properly mapped.) ~Default language~ (oops. bad issue. this field was already properly mapped.) ~Date created~ (oops. bad issue. this field was already properly mapped.) ~Date modified~ (oops. bad issue. this field was already properly mapped.) ~Version ID~ (oops. bad issue. this field was already properly mapped.) ~Date deployed~ (oops. bad issue. this field was already properly mapped.)

To Reproduce

  1. Run the the KM1. Get List of Kobo Forms job. This will trigger the KM2. Fetch Kobo Forms Data job and finally the KM3. Upsert Kobo Monitoring Data job .
  2. Log into the WCS test mssql DB and check the TT_KoboData table.

expression.js

⚠️ Please create a Staging branch and make all changes on this branch; do NOT commit to Master. Link to the job itself in Github: KM2. Fetch Kobo Forms Data job

state.json

Run the the KM1. Get List of Kobo Forms job using the details below. This will trigger the KM2. Fetch Kobo Forms Data job

MSSQL DB See LP for WCS test mssql db Once logged into the wcsprograms_opiant DB, select the dbo schema and find the table called TT_KOBODATA.

Note: You will require OpenFn VPN / Wireguard to connect to the DB.

KOBO TOOLBOX See LP for Trillion Trees Kobo (TT) Here is a sample json from Kobo that serves as input to Job 2

{
  "configuration": ["SEE LAST PASS: 'client cred'"],
  "data": { "a": 1 },
  "cursor": "2020-01-19 00:00:00"
}

Expected behavior

Data should be fetched from Kobo and used to trigger the sync Job (KM 3) to upsert data in the DB.

To test/resolve

  1. After the desired output is working locally (from the CLI), please [push commits to staging branch || open a pull request].
  2. Joseph will test on platform to confirm that the job is now able to fetch the right data from Kobo

Toggl

WCS Support 2023

mtuchi commented 1 year ago

@jayesse i have update the mapping to include the mapping for country, all the remaining mapping are fine except for Last submission time which we are still waiting for it's mapping spec

mtuchi commented 1 year ago

@taylordowns2000 https://github.com/WCS-ConsTech/OpenFn-TrillionTrees

taylordowns2000 commented 1 year ago

@jayesse , see above. i've edited this issue to reflect the real request and opened a new one for the new request on Last submission time

jayesse commented 1 year ago

@mtuchi As discussed, the issues here seem to be resolved from my end. Please move this to QA pending the client's confirmation. We will tackle the addition of new fields in issue #193. Thanks

aleksa-krolls commented 1 year ago

@jayesse can we close this out? We can always re-open or create another ticket if new issues

jayesse commented 1 year ago

Issue closed as it is resolved