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 OptionValue BAO to call pre/post hooks to prevent force-reset of managed option values #23130

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Apr 7, 2022

Overview

This fixes the worst part of the bug reported in https://lab.civicrm.org/dev/core/-/issues/3161 - in which all user-changes to CiviGrant option values were periodically force-reverted by the managed entity system.

Before

Any changes to grant-status option values would be reverted during the next upgrade or cache clear.

After

Changes persist.

Technical Details

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.

…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.
@civibot
Copy link

civibot bot commented Apr 7, 2022

(Standard links)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants