Skip to content

Commit

Permalink
dev/core#1867 Ensure that the qill matches the filter when no time is…
Browse files Browse the repository at this point in the history
… supplied
  • Loading branch information
seamuslee001 committed Jul 13, 2020
1 parent c287bfb commit fb4d166
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CRM/Report/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -2190,6 +2190,11 @@ public function dateClause(
$to .= ' 23:59:59';
}

if (strlen($to) === 10) {
// If we just have the date we assume the end of that day.
$to .= ' 23:59:59';
}

if ($relative) {
list($from, $to) = $this->getFromTo($relative, $from, $to, $fromTime, $toTime);
}
Expand Down Expand Up @@ -3310,7 +3315,10 @@ public function filterStat(&$statistics) {
if (!empty($this->_params["{$fieldName}_relative"])) {
list($from, $to) = CRM_Utils_Date::getFromTo($this->_params["{$fieldName}_relative"], NULL, NULL);
}

if (strlen($to) === 10) {
// If we just have the date we assume the end of that day.
$to .= ' 23:59:59';
}
if ($from || $to) {
if ($from) {
$from = date('l j F Y, g:iA', strtotime($from));
Expand Down

0 comments on commit fb4d166

Please sign in to comment.