Commit 2aada3d1 authored by jaapjansma's avatar jaapjansma
Browse files

Added is not empty as a filter operator.

parent b5b2a6f0
......@@ -22,6 +22,7 @@
* Added function to clone a data processor.
* Added Case ID field on the activity source.
* Added field to display relationships.
* Added is not empty as a filter operator.
# Version 1.0.7
......
......@@ -339,6 +339,16 @@ abstract class AbstractFilterHandler {
$isFilterSet = TRUE;
}
break;
case 'not null':
if (empty($submittedValues['value'])) {
$filterParams = [
'op' => 'IS NOT NULL',
'value' => '',
];
$this->setFilter($filterParams);
$isFilterSet = TRUE;
}
break;
case 'bw':
if (isset($submittedValues['min']) && $submittedValues['min'] && isset($submittedValues['max']) && $submittedValues['max']) {
$filterParams = [
......@@ -564,6 +574,7 @@ abstract class AbstractFilterHandler {
'IN' => E::ts('Is one of'),
'NOT IN' => E::ts('Is not one of'),
'null' => E::ts('Is empty'),
'not null' => E::ts('Is not empty'),
);
}
$types = \CRM_Utils_Type::getValidTypes();
......@@ -585,6 +596,7 @@ abstract class AbstractFilterHandler {
'>' => E::ts('Is greater than'),
'!=' => E::ts('Is not equal to'),
'null' => E::ts('Is empty'),
'not null' => E::ts('Is not empty'),
'bw' => E::ts('Is between'),
'nbw' => E::ts('Is not between'),
);
......@@ -598,6 +610,7 @@ abstract class AbstractFilterHandler {
'ew' => E::ts('Ends with'),
'nhas' => E::ts('Does not contain'),
'null' => E::ts('Is empty'),
'not null' => E::ts('Is not empty'),
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment