From: Coleman Watts Date: Wed, 15 Jan 2014 04:09:08 +0000 (-0800) Subject: CRM-13810 - Display campaign name on search builder X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=82a43d7169094ab338f103b2f191b5df27fa646a;p=civicrm-core.git CRM-13810 - Display campaign name on search builder --- diff --git a/CRM/Campaign/BAO/Query.php b/CRM/Campaign/BAO/Query.php index bfbb6980e2..177a7f61bd 100755 --- a/CRM/Campaign/BAO/Query.php +++ b/CRM/Campaign/BAO/Query.php @@ -85,6 +85,19 @@ class CRM_Campaign_BAO_Query { } } } + // CRM-13810 Translate campaign_id to label for search builder + if (is_array($query->_select)) { + foreach($query->_select as $field => $queryString) { + if (substr($field, -11) == 'campaign_id') { + $query->_pseudoConstantsSelect[$field] = array( + 'pseudoField' => 'campaign_id', + 'idCol' => $field, + 'bao' => 'CRM_Activity_BAO_Activity', + ); + } + } + } + //get survey clause in force, //only when we have survey id. diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index d276d481b4..f61917da9e 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -581,12 +581,7 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution { )); $extraFields = array( - 'contribution_campaign' => - array( - 'title' => ts('Campaign Title') - ), - 'contribution_batch' => - array( + 'contribution_batch' => array( 'title' => ts('Batch Name') ) );