CRM-17691 when doing a query to retrieve ids for export ... only retrieve the ids
authoreileen <emcnaughton@wikimedia.org>
Thu, 10 Dec 2015 04:20:24 +0000 (17:20 +1300)
committereileen <emcnaughton@wikimedia.org>
Mon, 14 Dec 2015 19:33:05 +0000 (08:33 +1300)
This has a substantial impact on peformance

Change-Id: Iad952ec7d0a0725b24c982efcca8c35482d6ae63

CRM/Contribute/Form/Task.php

index 7ecf9b7ce6707d8273b94b850a4a01e0de8f2b6c..b3bc0dca75c8d73cc7ee11b7b75d3cf836ed1539 100644 (file)
@@ -121,7 +121,7 @@ class CRM_Contribute_Form_Task extends CRM_Core_Form {
       }
 
       $form->_includesSoftCredits = CRM_Contribute_BAO_Query::isSoftCreditOptionEnabled($queryParams);
-      $query = new CRM_Contact_BAO_Query($queryParams, NULL, NULL, FALSE, FALSE,
+      $query = new CRM_Contact_BAO_Query($queryParams, array('contribution_id'), NULL, FALSE, FALSE,
         CRM_Contact_BAO_Query::MODE_CONTRIBUTE
       );
       // @todo the function CRM_Contribute_BAO_Query::isSoftCreditOptionEnabled should handle this