add missing property so the results are shown properly
authoryashodha <yashodha@cividesk.com>
Thu, 6 Dec 2018 07:42:11 +0000 (13:12 +0530)
committeryashodha <yashodha@cividesk.com>
Thu, 6 Dec 2018 07:42:11 +0000 (13:12 +0530)
CRM/Report/Form.php
CRM/Report/Form/Contribute/Lybunt.php

index f005e472f8f38261db66f4ad8273d4a3049bf557..8f2c1fe1d9f395d4c661dc575ec6992147302566 100644 (file)
@@ -4265,14 +4265,14 @@ LEFT JOIN civicrm_contact {$field['alias']} ON {$field['alias']}.id = {$this->_a
       $getCampaigns = CRM_Campaign_BAO_Campaign::getPermissionedCampaigns(NULL, NULL, FALSE, FALSE, TRUE);
       // If we have a campaign, build out the relevant elements
       if (!empty($getCampaigns['campaigns'])) {
-        $campaigns = $getCampaigns['campaigns'];
-        asort($campaigns);
+        $this->campaigns = $getCampaigns['campaigns'];
+        asort($this->campaigns);
         $this->_columns[$entityTable]['fields']['campaign_id'] = array('title' => ts('Campaign'), 'default' => 'false');
         if ($filters) {
           $this->_columns[$entityTable]['filters']['campaign_id'] = array(
             'title' => ts('Campaign'),
             'operatorType' => CRM_Report_Form::OP_MULTISELECT,
-            'options' => $campaigns,
+            'options' => $this->campaigns,
             'type' => CRM_Utils_Type::T_INT,
           );
         }
index 03e89d2d694394a575583bfb2edfec945127a669..bad9b8ff9e8fc893ad7501c9024ce31b45cfa755 100644 (file)
@@ -697,7 +697,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
       // convert campaign_id to campaign title
       if (array_key_exists('civicrm_contribution_campaign_id', $row)) {
         if ($value = $row['civicrm_contribution_campaign_id']) {
-          $rows[$rowNum]['civicrm_contribution_campaign_id'] = $this->activeCampaigns[$value];
+          $rows[$rowNum]['civicrm_contribution_campaign_id'] = $this->campaigns[$value];
           $entryFound = TRUE;
         }
       }