Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-20545 - Fix more reports to exclude deleted contacts #11244

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 1 addition & 26 deletions CRM/Report/Form/Contribute/Detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,32 +71,7 @@ public function __construct() {
'civicrm_contact' => array(
'dao' => 'CRM_Contact_DAO_Contact',
'fields' => $this->getBasicContactFields(),
'filters' => array(
'sort_name' => array(
'title' => ts('Donor Name'),
'operator' => 'like',
),
'id' => array(
'title' => ts('Contact ID'),
'no_display' => TRUE,
'type' => CRM_Utils_Type::T_INT,
),
'gender_id' => array(
'title' => ts('Gender'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id'),
),
'birth_date' => array(
'title' => ts('Birth Date'),
'operatorType' => CRM_Report_Form::OP_DATE,
),
'contact_type' => array(
'title' => ts('Contact Type'),
),
'contact_sub_type' => array(
'title' => ts('Contact Subtype'),
),
),
'filters' => $this->getBasicContactFilters(),
'grouping' => 'contact-fields',
'order_bys' => array(
'sort_name' => array(
Expand Down
9 changes: 8 additions & 1 deletion CRM/Report/Form/Contribute/HouseholdSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,14 @@ public function __construct() {
),
),
'filters' => array(
'household_name' => array('title' => ts('Household Name')),
'household_name' => array(
'title' => ts('Household Name'),
),
'is_deleted' => array(
'no_display' => TRUE,
'default' => 0,
'type' => CRM_Utils_Type::T_BOOLEAN,
),
),
'grouping' => 'household-fields',
),
Expand Down
32 changes: 1 addition & 31 deletions CRM/Report/Form/Contribute/Lybunt.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,37 +127,7 @@ public function __construct() {
'title' => ts('Contact Subtype'),
),
),
'filters' => array(
'sort_name' => array(
'title' => ts('Donor Name'),
'operator' => 'like',
),
'id' => array(
'title' => ts('Contact ID'),
'no_display' => TRUE,
),
'gender_id' => array(
'title' => ts('Gender'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id'),
),
'birth_date' => array(
'title' => ts('Birth Date'),
'operatorType' => CRM_Report_Form::OP_DATE,
),
'contact_type' => array(
'title' => ts('Contact Type'),
),
'contact_sub_type' => array(
'title' => ts('Contact Subtype'),
),
'is_deceased' => array(),
'do_not_phone' => array(),
'do_not_email' => array(),
'do_not_sms' => array(),
'do_not_mail' => array(),
'is_opt_out' => array(),
),
'filters' => $this->getBasicContactFilters(),
),
'civicrm_line_item' => array(
'dao' => 'CRM_Price_DAO_LineItem',
Expand Down
9 changes: 8 additions & 1 deletion CRM/Report/Form/Contribute/OrganizationSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,14 @@ public function __construct() {
),
),
'filters' => array(
'organization_name' => array('title' => ts('Organization Name')),
'organization_name' => array(
'title' => ts('Organization Name'),
),
'is_deleted' => array(
'no_display' => TRUE,
'default' => 0,
'type' => CRM_Utils_Type::T_BOOLEAN,
),
),
'grouping' => 'organization-fields',
),
Expand Down
62 changes: 2 additions & 60 deletions CRM/Report/Form/Contribute/Sybunt.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,41 +83,7 @@ public function __construct() {
'civicrm_contact' => array(
'dao' => 'CRM_Contact_DAO_Contact',
'grouping' => 'contact-field',
'fields' => array(
'sort_name' => array(
'title' => ts('Donor Name'),
'required' => TRUE,
),
'first_name' => array(
'title' => ts('First Name'),
),
'middle_name' => array(
'title' => ts('Middle Name'),
),
'last_name' => array(
'title' => ts('Last Name'),
),
'id' => array(
'no_display' => TRUE,
'required' => TRUE,
),
'gender_id' => array(
'title' => ts('Gender'),
),
'birth_date' => array(
'title' => ts('Birth Date'),
),
'age' => array(
'title' => ts('Age'),
'dbAlias' => 'TIMESTAMPDIFF(YEAR, contact_civireport.birth_date, CURDATE())',
),
'contact_type' => array(
'title' => ts('Contact Type'),
),
'contact_sub_type' => array(
'title' => ts('Contact Subtype'),
),
),
'fields' => $this->getBasicContactFields(),
'order_bys' => array(
'sort_name' => array(
'title' => ts('Last Name, First Name'),
Expand Down Expand Up @@ -148,31 +114,7 @@ public function __construct() {
'title' => ts('Contact Subtype'),
),
),
'filters' => array(
'sort_name' => array(
'title' => ts('Donor Name'),
'operator' => 'like',
),
'id' => array(
'title' => ts('Contact ID'),
'no_display' => TRUE,
),
'gender_id' => array(
'title' => ts('Gender'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id'),
),
'birth_date' => array(
'title' => ts('Birth Date'),
'operatorType' => CRM_Report_Form::OP_DATE,
),
'contact_type' => array(
'title' => ts('Contact Type'),
),
'contact_sub_type' => array(
'title' => ts('Contact Subtype'),
),
),
'filters' => $this->getBasicContactFilters(),
),
'civicrm_line_item' => array(
'dao' => 'CRM_Price_DAO_LineItem',
Expand Down
26 changes: 1 addition & 25 deletions CRM/Report/Form/Event/ParticipantListCount.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,31 +98,7 @@ public function __construct() {
'title' => ts('Contact Subtype'),
),
),
'filters' => array(
'sort_name' => array(
'title' => ts('Participant Name'),
'operator' => 'like',
),
'id' => array(
'title' => ts('Contact ID'),
'no_display' => TRUE,
),
'gender_id' => array(
'title' => ts('Gender'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id'),
),
'birth_date' => array(
'title' => ts('Birth Date'),
'operatorType' => CRM_Report_Form::OP_DATE,
),
'contact_type' => array(
'title' => ts('Contact Type'),
),
'contact_sub_type' => array(
'title' => ts('Contact Subtype'),
),
),
'filters' => $this->getBasicContactFilters(),
'grouping' => 'contact-fields',
'order_bys' => array(
'sort_name' => array(
Expand Down
53 changes: 2 additions & 51 deletions CRM/Report/Form/Member/ContributionDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,57 +70,8 @@ public function __construct() {
$this->_columns = array(
'civicrm_contact' => array(
'dao' => 'CRM_Contact_DAO_Contact',
'fields' => array(
'sort_name' => array(
'title' => ts('Donor Name'),
'required' => TRUE,
'no_repeat' => TRUE,
),
'first_name' => array(
'title' => ts('First Name'),
'no_repeat' => TRUE,
),
'last_name' => array(
'title' => ts('Last Name'),
'no_repeat' => TRUE,
),
'nick_name' => array(
'title' => ts('Nickname'),
'no_repeat' => TRUE,
),
'contact_type' => array(
'title' => ts('Contact Type'),
'no_repeat' => TRUE,
),
'contact_sub_type' => array(
'title' => ts('Contact Subtype'),
'no_repeat' => TRUE,
),
'do_not_email' => array(
'title' => ts('Do Not Email'),
'no_repeat' => TRUE,
),
'is_opt_out' => array(
'title' => ts('No Bulk Email(Is Opt Out)'),
'no_repeat' => TRUE,
),
'id' => array(
'no_display' => TRUE,
'required' => TRUE,
'csv_display' => TRUE,
'title' => ts('Contact ID'),
),
),
'filters' => array(
'sort_name' => array(
'title' => ts('Donor Name'),
'operator' => 'like',
),
'id' => array(
'title' => ts('Contact ID'),
'no_display' => TRUE,
),
),
'fields' => $this->getBasicContactFields(),
'filters' => $this->getBasicContactFilters(),
'grouping' => 'contact-fields',
),
'civicrm_email' => array(
Expand Down