Open
Description
Some time ago we've implemented a script to import data from RCRM to TaaS API https://github.com/topcoder-platform/taas-apis/tree/dev/scripts/recruit-crm-job-import via this task #101.
Since that we've done various updates to the Job and ResourceBookings models.
We have to update the script to it can work with updated models correctly.
At the moment it returns errors like these:
➜ taas-apis node scripts/recruit-crm-job-import ./scripts/recruit-crm-job-import/example_data1.csv
DEBUG: processing line #1 - {"directProjectId":"18001","projectId":"(dynamic load)","externalId":"59411222","title":"No role","startDate":"09/01/2021","endDate":"09/15/2021","numPositions":"7","userHandle":"nkumar2","jobid":"(dynamic load)","customerRate":"100","memberRate":"50","_lnum":1}
DEBUG: userHandle: nkumar2 userId: 4b00d029-c87b-47b2-bfe2-0ab80d8b5774
ERROR: #1 - Error: cannot POST /v5/resourceBookings (400)
DEBUG: processed line #1
DEBUG: processing line #2 - {"directProjectId":"18001","projectId":"(dynamic load)","externalId":"59411222","title":"Custom Role","startDate":"08/01/2021","endDate":"08/30/2021","numPositions":"1","userHandle":"GunaK-TopCoder","jobid":"(dynamic load)","customerRate":"200","memberRate":"100","_lnum":2}
DEBUG: userHandle: GunaK-TopCoder userId: 2bba34d5-20e4-46d6-bfc1-05736b17afbb
ERROR: #2 - Error: cannot POST /v5/resourceBookings (400)
DEBUG: processed line #2
INFO: === summary ===
INFO: total: 2
INFO: success: 0
INFO: failure: 2
INFO: skips: 0
INFO: jobs created: 0
INFO: resource bookings created: 0
INFO: jobs already exist: 0
INFO: resource bookings already exist: 0
INFO: === summary ===
INFO: done!