-
-
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
Add DedupeRule, DedupeRuleGroup and DedupeException API4 entity #20466
Conversation
(Standard links)
|
@eileenmcnaughton I have prepared the patch as per the suggestion in https://lab.civicrm.org/dev/core/-/issues/2486#note_56902 but only for DedupeRule entity. So as per the plan:
I am not sure if we need need to entirely discard the Rule entity declaration from xml and api3, in other words:
|
CRM/Core/DAO/AllCoreTables.data.php
Outdated
@@ -217,6 +217,11 @@ | |||
'class' => 'CRM_Dedupe_DAO_Rule', | |||
'table' => 'civicrm_dedupe_rule', | |||
], |
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.
It would be nice to get rid of CRM_Dedupe_DAO_Rule
here.
Isn't this file autogenerated? I think that means it would disappear anyway the next time CodeGen is run.
What about adding this to fix APIv3:
diff --git a/api/v3/utils.php b/api/v3/utils.php
index d96aae6785..5abea6650c 100644
--- a/api/v3/utils.php
+++ b/api/v3/utils.php
@@ -309,6 +309,11 @@ function _civicrm_api3_get_DAO($name) {
$name = 'Contact';
}
+ // Entity was renamed for APIv4
+ if ($name === 'Rule') {
+ return 'CRM_Dedupe_DAO_DedupeRule';
+ }
+
// hack to deal with incorrectly named BAO/DAO - see CRM-10859
// FIXME: DAO should be renamed CRM_Mailing_DAO_MailingEventQueue
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.
Hmm right, yeah thats another place in api3 to indicate the mapping between the old and new entity name. Updated the PR. Thanks for the patch.
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.
@colemanw keeping the old dao for a bit reduces the chance we break things as last dao renaming we had a few issues
Looks like the APIv4 ConformanceTest isn't going to be happy unless we also add the |
Jenkins test this please |
1 similar comment
Jenkins test this please |
Hmm , as per test build log something wrong with the xml
Not sure about the error, but maybe due to renaming the schema xml lead to this error somehow. |
(in the full console log) |
1acd1f1
to
12d0326
Compare
12d0326
to
bb4187d
Compare
Hooray! Fantastic work Monish! |
Overview
Add DedupeRule, DedupeRuleGroup and DedupeException APIv4 entity
Comments
ping @colemanw @eileenmcnaughton @seamuslee001