Add pseudoconstant to activityAssignment xml
authorColeman Watts <coleman@civicrm.org>
Mon, 12 Aug 2013 22:24:11 +0000 (15:24 -0700)
committerColeman Watts <coleman@civicrm.org>
Mon, 12 Aug 2013 22:24:11 +0000 (15:24 -0700)
CRM/Export/BAO/Export.php
xml/schema/Activity/ActivityContact.xml

index 137c6f2e6af5b397243773b07fb353774fe326d9..54777f48302ee21ee22adaec571d46cbadc94edb 100644 (file)
@@ -455,9 +455,7 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c
           $relIDs = $ids;
         }
         elseif ($exportMode == CRM_Export_Form_Select::ACTIVITY_EXPORT) {
-          $activityContacts = $activityContacts = CRM_Core_OptionGroup::values('activity_contacts',
-            FALSE, FALSE, FALSE, NULL, 'name');
-          $sourceID = CRM_Utils_Array::key('Activity Source', $activityContacts);
+          $sourceID = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_ActivityAssignment', 'record_type_id', 'Activity Source');
           $query = "SELECT contact_id FROM civicrm_activity_contact
                               WHERE activity_id IN ( " . implode(',', $ids) . ") AND
                               record_type_id = {$sourceID}";
index 3f5138b69440ba3af635b7aeed08f04a48955592..1cb6a72885b812883d2eb1628ecd0f168ac99497 100644 (file)
@@ -55,6 +55,9 @@
     <type>int unsigned</type>
     <title>Record Type ID</title>
     <comment>The record type id for this row</comment>
+    <pseudoconstant>
+      <optionGroupName>activity_contacts</optionGroupName>
+    </pseudoconstant>
     <add>4.4</add>
   </field>
   <index>