Skip to content

Commit

Permalink
Fix report form isTableSelected to treat relative date filters as fil…
Browse files Browse the repository at this point in the history
…ters.

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.
eileenmcnaughton committed Mar 27, 2018
1 parent 671e1ad commit 3d8f552
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions CRM/Report/Form.php
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 3d8f552

Please sign in to comment.