Selected fields not in CSV populate with first column value

Created on 10 May 2024, 6 months ago

When I tested this using a generated CSV and selecting the same fields in the CSV, all was fine... When we handed this over to QA, he selected all the fields and used my small test CSV (with only 3-4 fields in it).

To our surprise, all the selected fields that couldn't be mapped to a column in the CSV got set to the first column value for that row!

The issue is...
- in processUpload we use array_search to map columns - this sets "false" for columns with no mapped "position".
- Later in prepareRow, we loop over $fields_position (the mapping from ^) and if its not 'pass' then we lookup `$row[$position]` which is essentially `$row[false]` (zero).

I'll get a patch up in a mo...

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom nicholasthompson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024