From: eileenmcnaugton Date: Wed, 9 Sep 2015 11:24:17 +0000 (+1200) Subject: CRM-17115 fix change observed in QA on participant listing X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f6164149d1508898192e2182ed1eef7ea6c866fe;p=civicrm-core.git CRM-17115 fix change observed in QA on participant listing --- diff --git a/CRM/Report/Form/Event/ParticipantListing.php b/CRM/Report/Form/Event/ParticipantListing.php index 5e96c99720..b1ef746849 100644 --- a/CRM/Report/Form/Event/ParticipantListing.php +++ b/CRM/Report/Form/Event/ParticipantListing.php @@ -71,12 +71,23 @@ class CRM_Report_Form_Event_ParticipantListing extends CRM_Report_Form_Event { $this->_columns = array( 'civicrm_contact' => array( 'dao' => 'CRM_Contact_DAO_Contact', - 'fields' => array_merge($this->getBasicContactFields(), array( - 'age_at_event' => array( - 'title' => ts('Age at Event'), - 'dbAlias' => 'TIMESTAMPDIFF(YEAR, contact_civireport.birth_date, event_civireport.start_date)', - ), - )), + 'fields' => array_merge(array( + // CRM-17115 - to avoid changing report output at this stage re-instate + // old field name for sort name + 'sort_name_linked' => array( + 'title' => ts('Participant Name'), + 'required' => TRUE, + 'no_repeat' => TRUE, + 'dbAlias' => 'contact_civireport.sort_name', + )), + $this->getBasicContactFields(), + array( + 'age_at_event' => array( + 'title' => ts('Age at Event'), + 'dbAlias' => 'TIMESTAMPDIFF(YEAR, contact_civireport.birth_date, event_civireport.start_date)', + ), + ) + ), 'grouping' => 'contact-fields', 'order_bys' => array( 'sort_name' => array( @@ -376,6 +387,10 @@ class CRM_Report_Form_Event_ParticipantListing extends CRM_Report_Form_Event { ), ); + // CRM-17115 avoid duplication of sort_name - would be better to standardise name + // & behaviour across reports but trying for no change at this point. + $this->_columns['civicrm_contact']['fields']['sort_name']['no_display'] = TRUE; + // If we have active campaigns add those elements to both the fields and filters if ($campaignEnabled && !empty($this->activeCampaigns)) { $this->_columns['civicrm_participant']['fields']['campaign_id'] = array(