-
-
Notifications
You must be signed in to change notification settings - Fork 827
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
Expose sort_name as a dedupe-matchable field #13864
Conversation
(Standard links)
|
25a8bfc
to
5238367
Compare
test this please |
@@ -126,7 +127,7 @@ public static function &supportedFields($requestedType) { | |||
} | |||
} | |||
CRM_Utils_Hook::dupeQuery(CRM_Core_DAO::$_nullObject, 'supportedFields', $fields); | |||
return $fields[$requestedType]; | |||
return !empty($fields[$requestedType]) ? $fields[$requestedType] : []; |
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.
enotice fix as we are adding a test which fails on enotice
@eileenmcnaughton I've reviewed and tested this. Tests are passing. But the hardcoded sort_name field is a bit odd - I can see why you've done it and the explanation justifies it - but can you put that justification in as a code comment before merging? |
@mattwire good point - you'll get me trained on code comments yet :-) |
This opens up the option of us using a hook to do some standardisation - e.g getting rid of 'The' in the sort name & it helping with both sorting and with deduping
5238367
to
49cb372
Compare
@mattwire all good? |
Good to merge |
Overview
Allow sort_name to be used in dedupe rules
Before
sort_name not available
After
sort_name available, test
Technical Details
This opens up the option of us using a hook to do some standardisation - e.g getting rid of 'The'
in the sort name or perhaps trailing suffixes like 'Ltd' & it helping with both sorting and with deduping
Note that most of the fields available come from 'importable fields' - I thought about making this field 'importable' but it felt like there might be unknown consequences so I opted for just adding it in & securing it with a unit test (IMHO the test qualifies as the 'additional code improvement' required to justify it)
Comments