[CiviReport] Add "is null" and "is not null" to OP_MULTISELECT_SEPARATOR
Overview
In a report that uses a OP_MULTISELECT_SEPARATOR widget as a filter it is impossible to filter by "Is empty (Null)" / "Is not empty (Null)".
Current behaviour
In a report that uses a OP_MULTISELECT_SEPARATOR widget as a filter it is impossible to filter by "Is empty (Null)" / "Is not empty (Null)".
Proposed behaviour
Allow for "Is empty (Null)" / "Is not empty (Null)" options for OP_MULTISELECT_SEPARATOR filters.
Comments
This is a simple, straightforward change:
In Form.php
, function getOperationPair
, lines 1796 - 1804 add
case CRM_Report_Form::OP_MULTISELECT_SEPARATOR:
// use this operator for the values, concatenated with separator. For e.g if
// multiple options for a column is stored as ^A{val1}^A{val2}^A
$result = [
'mhas' => ts('Is one of'),
'mnot' => ts('Is not one of'),
// Add these two lines
'nll' => ts('Is empty (Null)'),
'nnll' => ts('Is not empty (Null)'),
];
return $result;
I have tested this for one report and it works as expected.