Deprecate conditions/actions?
We have conditions/actions that we've replaced with better versions, but maintained the old one for compatibility with existing rules.
However, some of these old conditions/actions are dangerous (e.g. see discussion on PR #26580). We should have a way of deprecating conditions/actions.
Proposal:
- Use
is_active
if it's not otherwise used - otherwise createis_deprecated
column. - Modify the upgrader to allow passing in the new value.
- A system check for rules with deprecated conditions/actions.
- Deprecated rules can't be selected on new rules.
- (Strongly prefer) we don't allow users to save rules with deprecated conditions/actions.
- In time, we remove the deprecated items.
I can write the code for this if there's buy-in from other stakeholders. I envision a deprecated()
method on deprecated conditions/actions that returns help text for replacing the condition/action. In many cases, it can probably be automated.