Lack of hooks to detect when a "CustomOption" is deleted
Overview
When a "CustomOption" is deleted, no hooks fire because all database operations are done via the CRM_Core_DAO::executeQuery
method.
Reproduction steps
- Delete an Option on, for example, a Custom Field of Data Type "Alphanumeric" and Field Type "CheckBox".
- No hooks fire.
Expected behaviour
At minimum civicrm_pre
and civicrm_post
should fire.
I realise that this papers over the way in which Options are handled for Custom Fields (i.e. they should probably be handled using the same logic as other OptionValues) but rebuilding the CustomOption system isn't on my radar at the moment - sorry!
Comments
PR that introduces civicrm_pre
and civicrm_post
hooks to follow.
Edited by haystack