[REF] [Import] Remove another good intention - import 'conflicts' #23380
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.
Overview
[REF] [Import] Remove another good intention - conflict
There is a lot of handling for the concept of 'conflict' in the import classes - but when I searched I was unable to find a way in which it would be invoked.
I actually couldn't figure out from the text when it should be invoked - what is an email with 'conflicting email addresses'?
I've been all over this code and can not find a single place where it is set (but lots of places where it is handled) so am concluding it was a good intention. Also, on balance, I wonder how useful it really is to have different types of errors? Ie we have
Of the above I think no_match is just another type of 'invalid'. Duplicate matches does feel special but I think 'no_match' could be folded into 'invalid'
Before
After
poof
Technical Details
Note that despite the huge amount of code what it is doing is quite simple - if an attempt to import a row resulted in a return code of
CRM_Import_Parser::CONFLICT
then theParser
class would output it to a csv file. Knowledge of the existence of the csv file would be passed around and assigned to the template - resulting in access to the csvIf this were to still happen in ANY class it would be the Contact class - but in addition to grepping I've been all over that code - it just doesn't happen
Comments
Oddly these functions propagated out from
CRM_Contact_Import_Parser
which was the in-between contact parser class folded intoCRM_Contact_Import_Parser_Contact
in 5.49 - that class says it was imported from svn - but the class doesn't seem to exist in svn over here - https://github.com/civicrm/civicrm-svn