-
-
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
dev/core#1597 & dev/core#1595 fix regression when deduping on custom fields #16558
Conversation
(Standard links)
|
@eileenmcnaughton i tested this however i ran into an e-notice
|
e5350a6
to
133c6c0
Compare
@seamuslee001 try again now |
@eileenmcnaughton test fails relate maybe need to supply a test data provider or something |
9d1adf2
to
dbe5276
Compare
It must be cleanup |
ebe5c3d
to
8b7b236
Compare
test this please |
Jenkins re test this please |
CRM/Core/DAO.php
Outdated
@@ -2578,7 +2578,7 @@ public static function buildOptionsContext($context = NULL) { | |||
* @param string $fieldName | |||
* @return bool|array | |||
*/ | |||
public function getFieldSpec($fieldName) { |
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.
@eileenmcnaughton this is change is causing karma to not run successfully
8b7b236
to
692e041
Compare
unrelated fail |
Overview
Fixes a regression where dedupe rules were failing when a custom field is the match field
Before
Create a dedupe rule with just a custom field as the critieria & try to use it -> fatal (bonus points use a custom date field - which would have already been broken)
After
Custom fields work in a rule
Technical Details
Some time back we started retrieving the metadata for fields because date fields need to be treated differently in the sql. The retrieval method assumed table_name was the Entity but for custom fields that was not the case - so marriage date would have resulted in bad sql but birth_date would have worked. More recently we tightened civicrm_api3() to fail if $entity was NULL so passing NULL entity became a had error (making it fail on all custom fields -not just date custom fields).
This fixes to get the entity correctly for custom fields & adds a test ensuring no fatal
Comments