Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • CiviCRM Core CiviCRM Core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
  • Issues 1,257
    • Issues 1,257
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • DevelopmentDevelopment
  • CiviCRM CoreCiviCRM Core
  • Issues
  • #3668
Closed
Open
Issue created Jun 17, 2022 by haystack@haystack🤔Developer

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

  1. Delete an Option on, for example, a Custom Field of Data Type "Alphanumeric" and Field Type "CheckBox".
  2. 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 Jun 17, 2022 by haystack
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking