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

dev/core#4132 Fix import for multi-custom boxes #25639

Merged
merged 2 commits into from
Mar 1, 2023

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Feb 22, 2023

Overview

dev/core#4132 Fix import for multi-custom boxes

This is a combination of #24902 and a fix to the Import_x.import action for easier testing and to stop brain damage

#24902 is not against the rc & should be, as a regression. I did a new PR rather than asking @jmcclelland to rebase his

Before

https://lab.civicrm.org/dev/core/-/issues/4132

  • enable Civi Import - note the first part of this is agnostic to the extension but there is a fix to the extension in the PR too

  • create a new custom contact field of type checkbox
    image
    image

  • do a contact import with a csv that looks like this (be sure to choose update on the first screen)
    ID,Field
    5,"a,b"
    6,a

  • map it like this
    image

  • run the import

  • click through to the error screen,
    image

  • select the failed row & try the import again
    image

Import of the row with one value fails, still fails on re-import

After

Rather than re-replicate the whole process just keep the error screen loaded. You can then pull the patch down and re-do the import action

It will re-import the row & it will go through! The right values should appear on contact 5 & contact 6

Technical Details

There are 2 parts here

  1. the patch from @jmcclelland - that works because it removes some code that became redundant during the big cleanup but I didn't remove as I was perhaps a bit scared it might be there for some reason. Since it actively breaks stuff it should go
  2. a fix to the import action. This isn't a regression - just a new-ish feature that is really confusing because it offers the user the chance to re-import a row & then actually skips trying if the row failed validation. Since the feature is in the extension & there are other import fixes already in 5.59 & it helps with this bug I figured it was OK to include

Comments

@civibot
Copy link

civibot bot commented Feb 22, 2023

No issue was found matching the number given in the pull request title. Please check the issue number.

@civibot
Copy link

civibot bot commented Feb 22, 2023

(Standard links)

@totten
Copy link
Member

totten commented Mar 1, 2023

Reflects combined testing from two developers (ie @jmcclelland and @eileenmcnaughton). Merging.

@totten totten merged commit d99e835 into civicrm:5.59 Mar 1, 2023
@totten totten deleted the import_validate branch March 1, 2023 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants