Open at055612 opened 2 years ago
Historically users have been able to create NOT() operators with multiple items. This means such expressions will likely exist in stroom instances. The back end will need to continue to support these expressions but the UI could be changed to prevent any further use of them, including forcing the uset to manually migrate such an expression if they try to edit it.
This relates to the changes made for #2563.
CommonExpressionMapper now ignores empty AND() and OR() operators (or effectively empty if all children are disabled), treating them as NoCondition when mapping to Jooq SQL. An empty NOT() will result in an exception.
To avoid background jobs failing the UI should prevent the user from creating an expression that contains an empty NOT() or a NOT() that is effectively empty when all its children are disabled.
This definitely applies to the retention rules editor and likely other editors as well, but should be handled in the common expression editor code.
If a user wishes to disable all the child items in an AND/OR/NOT then they can just disable the operator instead.