diff --git a/CRM/Activity/DAO/Activity.php b/CRM/Activity/DAO/Activity.php index 6d764364cbc5..e1acd532bc8b 100644 --- a/CRM/Activity/DAO/Activity.php +++ b/CRM/Activity/DAO/Activity.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Activity/Activity.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:20d5b91c29b14f4df12aabfc07c58e94) + * (GenCodeChecksum:e40c263d7d030dc0c6d6e714317a3970) */ /** @@ -659,11 +659,6 @@ public static function &fields() { 'html' => [ 'type' => 'Select', ], - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.4', ], 'activity_engagement_level' => [ diff --git a/CRM/Campaign/DAO/CampaignGroup.php b/CRM/Campaign/DAO/CampaignGroup.php index a448bd16fb08..96863381a859 100644 --- a/CRM/Campaign/DAO/CampaignGroup.php +++ b/CRM/Campaign/DAO/CampaignGroup.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Campaign/CampaignGroup.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:88f73bc59595d75977b66fe76466a22c) + * (GenCodeChecksum:a10a2acb5e6198e023bf1b97883b16cf) */ /** @@ -133,11 +133,6 @@ public static function &fields() { 'bao' => 'CRM_Campaign_DAO_CampaignGroup', 'localizable' => 0, 'FKClassName' => 'CRM_Campaign_DAO_Campaign', - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.3', ], 'group_type' => [ diff --git a/CRM/Campaign/DAO/Survey.php b/CRM/Campaign/DAO/Survey.php index aa303547eef3..72c340664801 100644 --- a/CRM/Campaign/DAO/Survey.php +++ b/CRM/Campaign/DAO/Survey.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Campaign/Survey.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:03edb270b63048ec3aa9f36667548961) + * (GenCodeChecksum:8a55f06388a594dd78f397320b1b55a6) */ /** @@ -270,11 +270,6 @@ public static function &fields() { 'bao' => 'CRM_Campaign_BAO_Survey', 'localizable' => 0, 'FKClassName' => 'CRM_Campaign_DAO_Campaign', - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.3', ], 'activity_type_id' => [ diff --git a/CRM/Contribute/DAO/Contribution.php b/CRM/Contribute/DAO/Contribution.php index e9936e8cf2eb..b8c6b0a03c04 100644 --- a/CRM/Contribute/DAO/Contribution.php +++ b/CRM/Contribute/DAO/Contribution.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Contribute/Contribution.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:11b9f8bc6198e4338be2406de58b6723) + * (GenCodeChecksum:66fa0e83ae7eb57a3c2e515c8fdc371c) */ /** @@ -843,11 +843,6 @@ public static function &fields() { 'html' => [ 'type' => 'Select', ], - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.4', ], 'creditnote_id' => [ diff --git a/CRM/Contribute/DAO/ContributionPage.php b/CRM/Contribute/DAO/ContributionPage.php index e38ebbf9fe1f..adc5656538a1 100644 --- a/CRM/Contribute/DAO/ContributionPage.php +++ b/CRM/Contribute/DAO/ContributionPage.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Contribute/ContributionPage.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:958ef76562a951e9f80b8e6f16afd6ee) + * (GenCodeChecksum:a8f42298c3fbe5b8c1986c81d77a8a0f) */ /** @@ -1033,11 +1033,6 @@ public static function &fields() { 'bao' => 'CRM_Contribute_BAO_ContributionPage', 'localizable' => 0, 'FKClassName' => 'CRM_Campaign_DAO_Campaign', - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.4', ], 'is_share' => [ diff --git a/CRM/Contribute/DAO/ContributionRecur.php b/CRM/Contribute/DAO/ContributionRecur.php index 9bed9fd903ad..08f922a170a9 100644 --- a/CRM/Contribute/DAO/ContributionRecur.php +++ b/CRM/Contribute/DAO/ContributionRecur.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Contribute/ContributionRecur.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:5e2fa2241a3f8c014352d897be31fad1) + * (GenCodeChecksum:69bfc032333f519d938978caf8d9d7ec) */ /** @@ -771,11 +771,6 @@ public static function &fields() { 'html' => [ 'type' => 'Select', ], - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '4.1', ], 'is_email_receipt' => [ diff --git a/CRM/Event/DAO/Event.php b/CRM/Event/DAO/Event.php index ea4305c1da9e..757ff158d46f 100644 --- a/CRM/Event/DAO/Event.php +++ b/CRM/Event/DAO/Event.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Event/Event.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:8747fe6387fcdec07b14c8a72e35868b) + * (GenCodeChecksum:c4d88cf24f327dc7f2f303f316e200c7) */ /** @@ -1637,11 +1637,6 @@ public static function &fields() { 'html' => [ 'type' => 'EntityRef', ], - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.4', ], 'is_share' => [ diff --git a/CRM/Event/DAO/Participant.php b/CRM/Event/DAO/Participant.php index 34537d28fa41..090bb8fe0374 100644 --- a/CRM/Event/DAO/Participant.php +++ b/CRM/Event/DAO/Participant.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Event/Participant.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:a746f8f8a28c6f945abbba148794d2c2) + * (GenCodeChecksum:f9815c8a89ad1055602bed39a0f266e8) */ /** @@ -495,11 +495,6 @@ public static function &fields() { 'bao' => 'CRM_Event_BAO_Participant', 'localizable' => 0, 'FKClassName' => 'CRM_Campaign_DAO_Campaign', - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.4', ], 'discount_amount' => [ diff --git a/CRM/Mailing/DAO/Mailing.php b/CRM/Mailing/DAO/Mailing.php index 0f754955da18..c76e999c8cb9 100644 --- a/CRM/Mailing/DAO/Mailing.php +++ b/CRM/Mailing/DAO/Mailing.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Mailing/Mailing.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:e2de6d8875a7f838b190810bcec4e27e) + * (GenCodeChecksum:9e22faebb14e886d7a5b4382249a0da6) */ /** @@ -968,11 +968,6 @@ public static function &fields() { 'html' => [ 'type' => 'Select', ], - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.4', ], 'dedupe_email' => [ diff --git a/CRM/Member/DAO/Membership.php b/CRM/Member/DAO/Membership.php index 3b4cc6356269..a72f2fc14413 100644 --- a/CRM/Member/DAO/Membership.php +++ b/CRM/Member/DAO/Membership.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Member/Membership.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:497f88dd714287acb6b42017dc0b7cd3) + * (GenCodeChecksum:614dc19edb8e63eb4a8a4c3523454511) */ /** @@ -502,11 +502,6 @@ public static function &fields() { 'html' => [ 'type' => 'Select', ], - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.4', ], ]; diff --git a/CRM/Pledge/DAO/Pledge.php b/CRM/Pledge/DAO/Pledge.php index c9ff550a9bf2..bb23c622e876 100644 --- a/CRM/Pledge/DAO/Pledge.php +++ b/CRM/Pledge/DAO/Pledge.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Pledge/Pledge.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:8a17ba664d9a2c65860be67652def7f5) + * (GenCodeChecksum:b7f0823c6d9fed7969a2734874ed20eb) */ /** @@ -657,11 +657,6 @@ public static function &fields() { 'html' => [ 'type' => 'Select', ], - 'pseudoconstant' => [ - 'table' => 'civicrm_campaign', - 'keyColumn' => 'id', - 'labelColumn' => 'title', - ], 'add' => '3.4', ], ]; diff --git a/tests/phpunit/CRM/Core/PseudoConstantTest.php b/tests/phpunit/CRM/Core/PseudoConstantTest.php index d83d48f28f3c..36a1dc33b73b 100644 --- a/tests/phpunit/CRM/Core/PseudoConstantTest.php +++ b/tests/phpunit/CRM/Core/PseudoConstantTest.php @@ -81,15 +81,6 @@ public function testOptionValues() { ]; $result = civicrm_api3('payment_processor', 'create', $api_params); - // Create a Campaign for testing. - $campaign_name = md5(microtime()); - $api_params = [ - 'title' => $campaign_name, - 'is_active' => TRUE, - 'status_id' => 2, - ]; - $result = civicrm_api3('campaign', 'create', $api_params); - // Create a membership type for testing. $membership_type = md5(microtime()); $api_params = [ @@ -243,10 +234,6 @@ public function testOptionValues() { 'fieldName' => 'medium_id', 'sample' => 'Phone', ], - [ - 'fieldName' => 'campaign_id', - 'sample' => $campaign_name, - ], ], 'CRM_Campaign_DAO_Campaign' => [ [ @@ -261,10 +248,6 @@ public function testOptionValues() { ], ], 'CRM_Campaign_DAO_Survey' => [ - [ - 'fieldName' => 'campaign_id', - 'sample' => $campaign_name, - ], [ 'fieldName' => 'activity_type_id', 'sample' => 'Phone Call', @@ -272,10 +255,6 @@ public function testOptionValues() { ], ], 'CRM_Campaign_DAO_CampaignGroup' => [ - [ - 'fieldName' => 'campaign_id', - 'sample' => $campaign_name, - ], [ 'fieldName' => 'group_type', 'sample' => 'Include', @@ -499,10 +478,6 @@ public function testOptionValues() { 'fieldName' => 'payment_instrument_id', 'sample' => 'Check', ], - [ - 'fieldName' => 'campaign_id', - 'sample' => $campaign_name, - ], ], 'CRM_Pledge_DAO_PledgePayment' => [ [ @@ -525,10 +500,6 @@ public function testOptionValues() { 'fieldName' => 'frequency_unit', 'sample' => 'month', ], - [ - 'fieldName' => 'campaign_id', - 'sample' => $campaign_name, - ], ], 'CRM_PCP_DAO_PCP' => [ [ @@ -778,10 +749,6 @@ public function testOptionValues() { 'sample' => ['USD' => 'US Dollar'], 'max' => 200, ], - [ - 'fieldName' => 'campaign_id', - 'sample' => $campaign_name, - ], ], 'CRM_Event_DAO_Event' => [ [ @@ -809,10 +776,6 @@ public function testOptionValues() { 'sample' => ['USD' => 'US Dollar'], 'max' => 200, ], - [ - 'fieldName' => 'campaign_id', - 'sample' => $campaign_name, - ], ], 'CRM_Core_DAO_Menu' => [ [ @@ -833,10 +796,6 @@ public function testOptionValues() { 'fieldName' => 'status_id', 'sample' => 'New', ], - [ - 'fieldName' => 'campaign_id', - 'sample' => $campaign_name, - ], ], 'CRM_Member_DAO_MembershipStatus' => [ [ @@ -891,10 +850,6 @@ public function testOptionValues() { 'fieldName' => 'visibility', 'sample' => 'Public Pages', ], - [ - 'fieldName' => 'campaign_id', - 'sample' => $campaign_name, - ], ], 'CRM_Mailing_DAO_MailingComponent' => [ [ @@ -967,10 +922,6 @@ public function testOptionValues() { 'fieldName' => 'contribution_page_id', 'sample' => $contribution_page, ], - [ - 'fieldName' => 'campaign_id', - 'sample' => $campaign_name, - ], ], 'CRM_Contribute_DAO_PremiumsProduct' => [ [ @@ -992,10 +943,6 @@ public function testOptionValues() { 'sample' => ['USD' => 'US Dollar'], 'max' => 200, ], - [ - 'fieldName' => 'campaign_id', - 'sample' => $campaign_name, - ], ], 'CRM_Case_DAO_Case' => [ [ diff --git a/tests/phpunit/CRM/Export/BAO/ExportTest.php b/tests/phpunit/CRM/Export/BAO/ExportTest.php index 49d0500a2109..fbcc2897148a 100644 --- a/tests/phpunit/CRM/Export/BAO/ExportTest.php +++ b/tests/phpunit/CRM/Export/BAO/ExportTest.php @@ -574,7 +574,7 @@ public function testExportPseudoField() { public function testExportPseudoFieldCampaign() { $this->setUpContributionExportData(); $campaign = $this->callAPISuccess('Campaign', 'create', ['title' => 'Big campaign and kinda long too']); - $this->callAPISuccess('Contribution', 'create', ['campaign_id' => 'Big_campaign_and_kinda_long_too', 'id' => $this->contributionIDs[0]]); + $this->callAPISuccess('Contribution', 'create', ['campaign_id' => $campaign['id'], 'id' => $this->contributionIDs[0]]); $selectedFields = [ ['contact_type' => 'Individual', 'name' => 'gender_id'], ['contact_type' => 'Contribution', 'name' => 'contribution_campaign_title'], diff --git a/xml/schema/Activity/Activity.xml b/xml/schema/Activity/Activity.xml index 3f7ee3169ca3..74f16248640c 100644 --- a/xml/schema/Activity/Activity.xml +++ b/xml/schema/Activity/Activity.xml @@ -339,11 +339,6 @@