-
-
Notifications
You must be signed in to change notification settings - Fork 825
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] Duplicate finding cleanup, including using supplied dedupe rule #23473
Conversation
(Standard links)
|
7c7bbdf
to
37c3d2f
Compare
37c3d2f
to
ca3fa15
Compare
d3b8a96
to
f2359d0
Compare
f2359d0
to
64623d6
Compare
64623d6
to
e89d0ff
Compare
Merged via #23476 |
I have been spending some time going over the latest merges for the import mechanism. I'm really appreciating all the work you are putting into this. I have a branch here which includes a few tests for some edge cases: master...darrick:deprecated_contact_check_params Test that import parser will not match the imported primary to an existing contact via the related contacts fields.
Test that import parser will not throw error if Related Contact is not found via passed in External ID.
Test that import parser will add contact with employee of relationship.
I ran across a few other things but how to handle them depend somewhat on how these issues are handled. I.e. I'm still hoping hook_civicrm_findDuplicates gets' called for the related contact before it throws a required field error because my hook is matching the passed in external_identifier to my entity which holds multiple identifiers. And then I'm hoping hook_import gets called on the related contact as well. But those are less bugs and more feature requests. I have this branch here where I was working on that stuff: master...darrick:import-match-related |
@darrick that's really exciting - both that you have been doing some testing and that you have written tests! I'll have a go at some of those tests now - I was just looking at the (crazy) relationship code - so the test will help a lot there. If you have a chance to review any of the open PRs that will help me get them merged quickly too |
@eileenmcnaughton I'd like to but I'm doing this a bit in my free time (9:30p here). I am finding it's easier for me to explain things via tests then in words. I will try my best. I've been using CiviCRM for about 15 years so I'm happy to do what I can to give back to the community. |
OK so the 3rd one was easy as you have already highlighted the problem - #23560 |
Regarding the hook - I agree that we should have better placed hooks! One to think about when stuff is a bit more settled though |
OK - last test is NOT failing for me - #23562 - let's see how jenkins gets on I have on my radar that there is still no test cover, and a possible regression, for when more than one contact can be matched |
Overview
Fix from @darrick darrick@9b1470a combined with cleanup of how duplicate contacts are handled in the import script
Before
Dedupe handling is 'lightly sprinkled' throughout the script
After
Baby steps on consolidation
Technical Details
@darrick if you get a chance to test this please do - I'm gonna try to do a bit more cleanup on top of this
Comments
A more ambitious version of this PR is #23476 - if that is merged then this will automatically closed or if this is merged first then I will rebase this out of that (it depends which a reviewer prefers)