Skip to content
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

Fix for #180: passing the entity ID to the custom hook when deleting a custom value #12309

Merged

Conversation

jaapjansma
Copy link
Contributor

@jaapjansma jaapjansma commented Jun 13, 2018

Overview

When deleting a custom value record from a multiple custom data set. The entityId is not passed to the hook civicrm_custom. This causes some weird behaviours in extensions (for example CiviRules, see: https://github.com/CiviCooP/org.civicoop.civirules/issues/208

See https://lab.civicrm.org/dev/core/issues/180

Before

Upon deleting a custom value $entityID parameter of the hook civicrm_custom is not set.

After

Upon deleting a custom value $entityID parameter of the hook civicrm_custom is set to the right value..

@civibot
Copy link

civibot bot commented Jun 13, 2018

(Standard links)

@colemanw
Copy link
Member

As a general rule I'm against adding extra db queries just for the sake of hooks (since it's a performance hit and those hooks are seldom used) but in this case I'd give it a +1 since a delete is not that common and it would improve consistency.

@colemanw colemanw merged commit ffa950d into civicrm:master Jun 13, 2018
@jaapjansma
Copy link
Contributor Author

Thanks for merging. I totally agree we should keep the sql statements down for performance.

@jaapjansma jaapjansma deleted the issue_180_deleting_custom_values branch June 14, 2018 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants