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

[Import] Simplify checking contact type is valid #23476

Merged
merged 5 commits into from
May 19, 2022

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

[Import] Simplify checking contact type is valid

This builds on other open PRs & ensures we are checking in a sensible way that we are not changing the contact type

Before

Where to start - this is being handled in multiple places

After

The lookupContactID function

  1. loads the id from external identifier, if applicable
  2. checks the contact type is the same as the saved one & rejects the row if now
  3. loads from the dedupe rule if the other failed - note the ContactType is implicit in the dedupe rule load

Technical Details

There is still a lotta code around contact_subtype handling which I'll move over next

Comments

@civibot
Copy link

civibot bot commented May 17, 2022

(Standard links)

@eileenmcnaughton
Copy link
Contributor Author

@monishdeb if you get more time to review then this - or #23473 would be great - I'm making real inroads into getting this stuff into a sane state

@colemanw
Copy link
Member

This looks like a sensible simplification & is tested.

@colemanw colemanw merged commit d753d3d into civicrm:master May 19, 2022
@colemanw colemanw deleted the import_dupe_more branch May 19, 2022 00:16
@eileenmcnaughton
Copy link
Contributor Author

yay thanks - building more tests on it all the time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants