Skip to content

Commit

Permalink
dev/core#682 Add basic contact filters to Summary Contributions Report
Browse files Browse the repository at this point in the history
  • Loading branch information
francescbassas committed Jan 25, 2019
1 parent 1ba3579 commit 1ebe1a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CRM/Report/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -4834,9 +4834,11 @@ public function getBasicContactFields() {
/**
* Get a standard set of contact filters.
*
* @param array $defaults
*
* @return array
*/
public function getBasicContactFilters() {
public function getBasicContactFilters($defaults = array()) {
return array(
'sort_name' => array(
'title' => ts('Contact Name'),
Expand Down Expand Up @@ -4872,7 +4874,7 @@ public function getBasicContactFilters() {
'is_deceased' => array(
'title' => ts('Deceased'),
'type' => CRM_Utils_Type::T_BOOLEAN,
'default' => 0,
'default' => CRM_Utils_Array::value('deceased', $defaults, 0),
),
'do_not_email' => array(
'title' => ts('Do not email'),
Expand Down
1 change: 1 addition & 0 deletions CRM/Report/Form/Contribute/Summary.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public function __construct() {
),
)
),
'filters' => $this->getBasicContactFilters(array('deceased' => NULL)),
'grouping' => 'contact-fields',
'group_bys' => array(
'id' => array('title' => ts('Contact ID')),
Expand Down

0 comments on commit 1ebe1a5

Please sign in to comment.