From 2edb4e81011c6a22bf88c704716cceadd00a3ced Mon Sep 17 00:00:00 2001 From: monishdeb Date: Sat, 19 Sep 2015 02:09:45 +0530 Subject: [PATCH] CRM-16920 - When coding a report template, can specify a default 'from' and 'to' for date ranges, but not for integer ranges https://issues.civicrm.org/jira/browse/CRM-16920 --- CRM/Report/Form.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index 83f54aa7df..f2087788e4 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -813,6 +813,10 @@ class CRM_Report_Form extends CRM_Core_Form { } } else { + if ((CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_INT) && is_array($field['default'])) { + $this->_defaults["{$fieldName}_min"] = CRM_Utils_Array::value('min', $field['default']); + $this->_defaults["{$fieldName}_max"] = CRM_Utils_Array::value('max', $field['default']); + } $this->_defaults["{$fieldName}_value"] = $field['default']; } } -- 2.25.1