-
-
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
CRM-17275 fix import class to do a fallback external identifier check #7427
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is falling back to the default "Unsupervised" rule not the Rule chosen in the Import UI. I added: $checkParams['dedupe_rule_id'] = $this->_dedupeRuleGroupID ?? NULL; to get things to work on my end.
Is that the way this is supposed to work? The import code checks for dupes a number of times. But I've been struggling with inconsistent results. As my importing is based off of my own custom rules.
I can do a PR if indeed the selected Rule should run at this point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@darrick I've been doing some clean up on this code over this release & last - I'm happy to look into this & put up a PR if you are OK to test it - it's a bit of a moving target - you can see that this was just merged #23455 allowing code removal in #23461
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. I'll check that out. It's the weekend and I should stop working. I made two tests here: darrick@9b1470a
the second test fails when external_identifier doesn't match but Dedupe does match. The first test passes when not external_identifier is passed in. My current use case is trying to maintain sync with external data even after contacts are merged on the Civi side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh nice - I guess the thing that will change with the way things are going is that we would use
getSubmittedValue('dedupe_rule_id')
to do the rule ID - but I'd also quite like to combine the 2 separate places where we do do dedupe look ups -Yes - get some weekend in!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@darrick your test + some additional clean up is in this PR #23473 - I also did a version with even more cleanup - #23476 - if you have the capacity to take a look & confirm we can get them merged