ymcatwincities/openy_gated_content

Outdated gc_auth_custom_users.csv format does not throw specific error

Closed this issue · 5 comments

One of our site owners attempted to upload their gc_auth_custom_users.csv with what I think is a very old column layout:
"Id,Firstname,Lastname,YBillingMember,Email"
...instead of the expected:
"Member ID,Member First Name,Primary Member,Member Email,Package Name,Package Site".

The file looked like it imported on her end with no validation error thrown.

Can this validation get added to the roadmap?

Hi @TomScarboroughYMCA

I think this is bad idea to add validation for CSV file, because migration can be different for each project, you just need to add customization for migrate_plus.migration.gc_auth_custom_users.yml config.

So in your case you just need to fix fields:

  fields:
    -
      name: member_id
      label: 'ID'
    -
      name: first_name
      label: 'Firstname'
    -
      name: last_name
      label: 'Lastname'
    -
      name: member
      label: 'YBillingMember'
    -
      name: email
      label: 'Email'

If you want to use Lastname in user name, just add this value to source:

  name:
    plugin: concat
    source:
      - first_name
      - last_name
      - member_id

cc @podarok

@TomScarboroughYMCA have you reviewed @hamrant solution above? If so, can we move forward and close this ticket?

@TomScarboroughYMCA have you had a chance to review @hamrant solution? If so, does it fully solve your issue to close out this ticket?

HI @sarah-halby and @hamrant - I apologize for letting this slip through the cracks for so long. Since the time this issue was opened I have worked closely with our Y's to get their CSV files correct. They in turn have been pretty quick to contact me/Y Cloud support when they hit any problems with the member CSV. So this can be closed out without spending any further effort. Many thanks to @hamrant for your comments and proposal.

Thanks @TomScarboroughYMCA - I'm glad that another solution presented itself. :-)