mailtrain
mailtrain copied to clipboard
(v2) Save values from group options on CSV import. Fix #638
This PR fixes #638. When importing a CSV file, the columns mapped to Option fields with a containing group are overwritten as false.
Steps to reproduce the bug:
- Create a List
- Go to Fields and a add a
Checkboxes (from options)
field. [for example, let's call itPARTICIPANT_YEAR
] - Add another field, now an "Option" one. Mark the checkbox
Belongs to checkbox / dropdown / radio group
, and inContaining Group
select the field you created on step two. [for example,2020
] - Create a simple CSV file, with three columns:
email
,name
andparticipant_2020
. Add a row with some data - in the last column you can put1
oryes
. - Try to import the file, mapping the new column [
participant_2020
in the example] to the Option field created in step three. The subscriber will be added or updated, but the checkbox data will be in blank.
After merging this commit, repeat step 5. Now the values must be correctly saved.
Hmmm it seems that Option fields not mapped on import at the end are overwritten as false. I imagine this isn't the expected behavior, am I right? Does anyone know how to solve it quickly?
Thanks. I have to check this. I'll come back to you.