CRM-17691 add the campaign id to selector even though it ? is not used?
authoreileen <emcnaughton@wikimedia.org>
Mon, 14 Dec 2015 19:28:25 +0000 (08:28 +1300)
committereileen <emcnaughton@wikimedia.org>
Mon, 14 Dec 2015 19:33:05 +0000 (08:33 +1300)
Without this we get enotices on a basic search - but there is no evidenc the field is actually rendered:-(

Change-Id: I0b57e1dcaf444ad54f3d1144542e13a55f162659

CRM/Contribute/BAO/Query.php
CRM/Contribute/Selector/Search.php

index 60547162eebcfb97f4069e06a9943a4b0f84eb29..ffadad33e4df889946766502c809acb1dd40f6ed 100644 (file)
@@ -868,6 +868,8 @@ class CRM_Contribute_BAO_Query {
       'is_pay_later' => 1,
       'thankyou_date' => 1,
       'total_amount' => 1,
+      // Without this value here we get an e-notice BUT the value does not appear to be rendered anywhere.
+      'contribution_campaign_id' => 1,
       'contribution_status_id' => 1,
       // @todo return this & fix query to do pseudoconstant thing.
       'contribution_status' => 1,
index 15606901470643349601b776984946bfd7971cbf..fd1327706d374547e3c7f34c895c7ee34b5763b5 100644 (file)
@@ -406,6 +406,8 @@ class CRM_Contribute_Selector_Search extends CRM_Core_Selector_Base implements C
       }
 
       //carry campaign on selectors.
+      // @todo - I can't find any evidence that 'carrying' the campaign on selectors actually
+      // results in it being displayed anywhere so why do we do this???
       $row['campaign'] = CRM_Utils_Array::value($result->contribution_campaign_id, $allCampaigns);
       $row['campaign_id'] = $result->contribution_campaign_id;