Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contact Import with Dropdown field(s) failing #390

Closed
adrianjean opened this issue May 26, 2023 · 2 comments
Closed

Contact Import with Dropdown field(s) failing #390

adrianjean opened this issue May 26, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@adrianjean
Copy link

adrianjean commented May 26, 2023

Description:

  • When importing a CSV file of contacts where the contacts have Dropdown fields set by values in the CSV, the import fails with the log flagging all Dropdown fields as the source of the failure

Steps to reproduce:

  • Add one or more Dropdown fields to the contact Field layout with two or more possible options.
  • Export a CSV from the Campaign->Contacts page to create a "template" to work from
  • Add new contacts to the template, providing value(s) for dropdown fields for each new contact. Values are the not the "Title" but the actual "value" of the dropdown selection.
  • Import the CSV and note that it fails, logs report the failure is on importing the Dropdowns

Craft: 4.4.13
Campaign: 2.7.1

Configuration:

  • Dropdown: Gender Identity (contactGender)
    Value Options (Not titles): female, male, other

  • Dropdown: Supporter (contactSupport)
    Value Options (Not titles): yes, no, maybe, unknown

Notes

  • I have MultiSelect fields and Category fields that do seem to import.

Sample CSV:

email,contactFirstName,contactLastName,contactPhone,contactAddressStreet,contactAddressPostalCode,contactGender,contactGroup,contactSupporter,contactVolunteer,contactDonationAmount
test2@email.com,Sarah,Smith,555-222-1234,"235 Main St.","Z1Z 1Z1",female,Newsletter,yes,volunteer,400

Import Log Error

[2023-05-26 08:02:06] Line 1: Gender Identity is invalid.. Supporter is invalid.
@adrianjean adrianjean added the bug Something isn't working label May 26, 2023
@bencroker
Copy link
Collaborator

Thanks for reporting this. It turned out to be a bug in the importing of custom fields, meaning that the imported value for the dropdown field was blank which was likely not an allowed value. I’ve fixed it in 8574ef9 and released in version 2.7.2.

@adrianjean
Copy link
Author

Amazing thank you! — Really outstanding plugin the more I dig into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants