From 3da34b73681b281dd1a51cceac551d871c744eca Mon Sep 17 00:00:00 2001 From: yashodha Date: Mon, 9 Sep 2019 13:55:09 +0530 Subject: [PATCH] CRM-21677 - report clean up for participant reports --- CRM/Report/Form/Event/ParticipantListCount.php | 18 +----------------- CRM/Report/Form/Event/ParticipantListing.php | 8 -------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/CRM/Report/Form/Event/ParticipantListCount.php b/CRM/Report/Form/Event/ParticipantListCount.php index 7ff1c1fca6..faedec726a 100644 --- a/CRM/Report/Form/Event/ParticipantListCount.php +++ b/CRM/Report/Form/Event/ParticipantListCount.php @@ -599,23 +599,7 @@ class CRM_Report_Form_Event_ParticipantListCount extends CRM_Report_Form { $entryFound = TRUE; } - //handle gender - if (array_key_exists('civicrm_contact_gender_id', $row)) { - if ($value = $row['civicrm_contact_gender_id']) { - $gender = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id'); - $rows[$rowNum]['civicrm_contact_gender_id'] = $gender[$value]; - } - $entryFound = TRUE; - } - - // display birthday in the configured custom format - if (array_key_exists('civicrm_contact_birth_date', $row)) { - $birthDate = $row['civicrm_contact_birth_date']; - if ($birthDate) { - $rows[$rowNum]['civicrm_contact_birth_date'] = CRM_Utils_Date::customFormat($birthDate, '%Y%m%d'); - } - $entryFound = TRUE; - } + $entryFound = $this->alterDisplayContactFields($row, $rows, $rowNum, NULL, NULL) ? TRUE : $entryFound; // skip looking further in rows, if first row itself doesn't // have the column we need diff --git a/CRM/Report/Form/Event/ParticipantListing.php b/CRM/Report/Form/Event/ParticipantListing.php index 018be0cf2d..949a6ff8e7 100644 --- a/CRM/Report/Form/Event/ParticipantListing.php +++ b/CRM/Report/Form/Event/ParticipantListing.php @@ -761,14 +761,6 @@ ORDER BY cv.label $entryFound = $this->alterDisplayContactFields($row, $rows, $rowNum, 'event/participantListing', 'View Event Income Details') ? TRUE : $entryFound; - // display birthday in the configured custom format - if (array_key_exists('civicrm_contact_birth_date', $row)) { - $birthDate = $row['civicrm_contact_birth_date']; - if ($birthDate) { - $rows[$rowNum]['civicrm_contact_birth_date'] = CRM_Utils_Date::customFormat($birthDate, '%Y%m%d'); - } - $entryFound = TRUE; - } $entryFound = $this->alterDisplayAddressFields($row, $rows, $rowNum, 'event/ParticipantListing', 'List all participant(s) for this ') ? TRUE : $entryFound; // skip looking further in rows, if first row itself doesn't -- 2.25.1