Fix OptionValue BAO to call pre/post hooks to prevent force-reset of managed entities
authorColeman Watts <coleman@civicrm.org>
Thu, 7 Apr 2022 19:40:30 +0000 (15:40 -0400)
committerColeman Watts <coleman@civicrm.org>
Thu, 7 Apr 2022 23:28:54 +0000 (19:28 -0400)
commitad1dc042fb6f057d6b6aacbc39b0e80544425fe1
tree75905502eb3e3c31d9d1d41b71c28b9a8f1e1060
parent00a626fa0fbf5dd51f1c50084fa77daa21874fb2
Fix OptionValue BAO to call pre/post hooks to prevent force-reset of managed entities

Managed entities rely on pre/post hooks being called in order to track whether an entity
has been modified. Without those hooks OptionValues were being force-reverted by the
managed system even when the 'update' mode was set to 'unmodified', which is supposed
to defer to user modifications.
CRM/Core/BAO/OptionValue.php
tests/phpunit/api/v4/Entity/ManagedEntityTest.php