-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
Handle error when creating related contact #23660
Conversation
(Standard links)
|
e143cff
to
f363bf1
Compare
I got this to pass. But I don't understand why I had to add the getImportTrackingFields part. As it looks like your tests are passing without that. My branch must be out of sync somewhere. I still have a lot of trouble with that.
|
@darrick if you started testing with the import tracking & then I removed it it might have messed you up! I think I can turn your diff above into an extra test & then you think this is mergeable? (My preference is to get stuff merged before the rc is cut then if we find any issues we will be doing it on saner code :-) |
@eileenmcnaughton sounds good. And true when I step through dedupe is always called twice for each contact. Getting rid of that should speed things up. I think that is the biggest performance hit. But I'm just guessing. |
f363bf1
to
a2ad687
Compare
964eedd
to
9bd3911
Compare
@darrick I've added your test as a dataprovider |
test this please |
@seamuslee001 did this just fail on the package issue? We have a gitlab for that but I didn't expect it to affect tests? https://test.civicrm.org/job/CiviCRM-Core-PR/49362/consoleFull |
@seamuslee001 @colemanw @demeritcowboy is one of you able to merge this based on the collaboration with @darrick ? |
9bd3911
to
1e527a3
Compare
merged via another PR - @darrick if you can focus your testing on master now it has this fix |
Overview
Handle error when creating related contact
Before
I just triedPer #23643 (comment) doing an import like this where the ext id can't be found causes an e-notice as the exception is not being caught where it should be
After
The e-notice is gone, the code is simplified because a lot of it was duplicating the dedupe lookup already done in
processContact
Technical Details
While there is no support currently for calling import()
outside of run() - the intent is to replace run() with something
more sane - which WILL be callable from the outside (likely
via api).
The right behaviour for import() is to catch all errors
Note this also contains a couple of other cleanup PRs - they are minor PRs with no expected behaviour change that can be veried by doing an r-run on 'any' contact import so I figured I should include them for r-run simplicity
The actual commit for this PR is 9bd3911
Comments
@darrick are you able to test this