From 67f14d40fed6300c43f014310eaaacb85d6523c5 Mon Sep 17 00:00:00 2001 From: Madhavi Date: Tue, 30 Oct 2018 13:25:56 +0530 Subject: [PATCH] CRM-20236 Added participant note column (#13029) * CRM-20236 Added participant note column in Event Participant Listing report * fix code style warnings and switch to $this->isTableSelected --- CRM/Report/Form/Event/ParticipantListing.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CRM/Report/Form/Event/ParticipantListing.php b/CRM/Report/Form/Event/ParticipantListing.php index 29ee945c1d..71595ad955 100644 --- a/CRM/Report/Form/Event/ParticipantListing.php +++ b/CRM/Report/Form/Event/ParticipantListing.php @@ -294,6 +294,15 @@ class CRM_Report_Form_Event_ParticipantListing extends CRM_Report_Form_Event { ), ), ), + 'civicrm_note' => array( + 'dao' => 'CRM_Core_DAO_Note', + 'fields' => array( + 'participant_note' => array( + 'name' => 'note', + 'title' => ts('Participant Note'), + ), + ), + ), 'civicrm_contribution' => array( 'dao' => 'CRM_Contribute_DAO_Contribution', 'fields' => array( @@ -519,6 +528,14 @@ ORDER BY cv.label $this->joinPhoneFromContact(); $this->joinEmailFromContact(); + // Include participant note. + if ($this->isTableSelected('civicrm_note')) { + $this->_from .= " + LEFT JOIN civicrm_note {$this->_aliases['civicrm_note']} + ON ( {$this->_aliases['civicrm_note']}.entity_table = 'civicrm_participant' AND + {$this->_aliases['civicrm_participant']}.id = {$this->_aliases['civicrm_note']}.entity_id )"; + } + if ($this->_contribField) { $this->_from .= " LEFT JOIN civicrm_participant_payment pp -- 2.25.1