eileenmcnaughton / nz.co.fuzion.csvimport

Import to API using csv GUI
GNU Affero General Public License v3.0
8 stars 27 forks source link

Update Import.php #45

Open petednz opened 2 years ago

petednz commented 2 years ago

This was a fix i see J. did that fixed a problem for a client. I just had to do some digging as they were again having an issue, but this time was their data. so having found this. and while being a bit clueless on what it fixed, i thought I should put it here for others to review.

petednz commented 2 years ago

The client had said

error "Error with entity "create"! (Mandatory key(s) missing from params array: one of (case_type, case_type_id)). the CSV file contains those fields, I've tried using the case type ID, case type label, case type name and I still get this error

and all I know is after this patch was created/applied, the import worked for them. Luke said

it looks like the code updates the validate function to allow for data to have api.*.get calls and allow them. I assume this means you can do an api lookup as part of the import