From 3d8f552ecc1fe416204461a9c3ed9c884e12e43e Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 27 Mar 2018 17:30:43 +1300 Subject: [PATCH] Fix report form isTableSelected to treat relative date filters as filters. isTableSelected looks to see if the filter has been passed in. Without this it looks in ->_params[{}_value] & for {}_op to be null or 'not null' but misses relative date filters. --- CRM/Report/Form.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index 98b0ed3e0e65..c65b3dd0d72d 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -3996,10 +3996,11 @@ public function selectedTables() { } if (array_key_exists('filters', $table)) { foreach ($table['filters'] as $filterName => $filter) { - if (!empty($this->_params["{$filterName}_value"]) || - CRM_Utils_Array::value("{$filterName}_op", $this->_params) == - 'nll' || - CRM_Utils_Array::value("{$filterName}_op", $this->_params) == + if (!empty($this->_params["{$filterName}_value"]) + || !empty($this->_params["{$filterName}_relative"]) + || CRM_Utils_Array::value("{$filterName}_op", $this->_params) == + 'nll' + || CRM_Utils_Array::value("{$filterName}_op", $this->_params) == 'nnll' ) { $this->_selectedTables[] = $tableName;