From e1ab2e919575494d0f94d884347ba84889bc6985 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 2 Jan 2014 21:50:44 -0800 Subject: [PATCH] CRM-13810 - Campaign Search - remove data constraint, rename Campaign ID to Campaign, and remove Campaign Name from search builder --- CRM/Contact/Form/Search/Builder.php | 5 ++++- CRM/Core/PseudoConstant.php | 3 +-- xml/schema/Activity/Activity.xml | 3 +-- xml/schema/Campaign/CampaignGroup.xml | 1 - xml/schema/Campaign/Survey.xml | 1 - xml/schema/Contribute/Contribution.xml | 3 +-- xml/schema/Contribute/ContributionPage.xml | 1 - xml/schema/Contribute/ContributionRecur.xml | 3 +-- xml/schema/Event/Event.xml | 3 +-- xml/schema/Event/Participant.xml | 3 +-- xml/schema/Mailing/Mailing.xml | 1 - xml/schema/Member/Membership.xml | 3 +-- xml/schema/Pledge/Pledge.xml | 3 +-- 13 files changed, 12 insertions(+), 21 deletions(-) diff --git a/CRM/Contact/Form/Search/Builder.php b/CRM/Contact/Form/Search/Builder.php index bb639f6125..f34bb155ae 100644 --- a/CRM/Contact/Form/Search/Builder.php +++ b/CRM/Contact/Form/Search/Builder.php @@ -393,12 +393,15 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search { } static function fields() { - return array_merge( + $fields = array_merge( CRM_Contact_BAO_Contact::exportableFields('All', FALSE, TRUE), CRM_Core_Component::getQueryFields(), CRM_Contact_BAO_Query_Hook::singleton()->getFields(), CRM_Activity_BAO_Activity::exportableFields() ); + // CRM-13810 Remove 'Campaign Title' pseudofield + CRM_Utils_Array::remove($fields, 'activity_campaign', 'participant_campaign', 'member_campaign', 'pledge_campaign'); + return $fields; } /** diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php index bb95606143..1a2630d3be 100644 --- a/CRM/Core/PseudoConstant.php +++ b/CRM/Core/PseudoConstant.php @@ -303,8 +303,7 @@ class CRM_Core_PseudoConstant { $pseudoconstant = $fieldSpec['pseudoconstant']; // Merge params with schema defaults $params += array( - // Skip default condition in validate context - 'condition' => $context == 'validate' ? array() : CRM_Utils_Array::value('condition', $pseudoconstant, array()), + 'condition' => CRM_Utils_Array::value('condition', $pseudoconstant, array()), 'keyColumn' => CRM_Utils_Array::value('keyColumn', $pseudoconstant), 'labelColumn' => CRM_Utils_Array::value('labelColumn', $pseudoconstant), ); diff --git a/xml/schema/Activity/Activity.xml b/xml/schema/Activity/Activity.xml index 6757e76097..8aec77bebd 100644 --- a/xml/schema/Activity/Activity.xml +++ b/xml/schema/Activity/Activity.xml @@ -369,14 +369,13 @@ campaign_id activity_campaign_id int unsigned - Campaign ID + Campaign true The campaign for which this activity has been triggered. civicrm_campaign
id title - (end_date IS NULL OR end_date > NOW())
3.4 diff --git a/xml/schema/Campaign/CampaignGroup.xml b/xml/schema/Campaign/CampaignGroup.xml index 29e97c76ec..2432ee0025 100644 --- a/xml/schema/Campaign/CampaignGroup.xml +++ b/xml/schema/Campaign/CampaignGroup.xml @@ -27,7 +27,6 @@ civicrm_campaign
id title - (end_date IS NULL OR end_date > NOW()) 3.3 diff --git a/xml/schema/Campaign/Survey.xml b/xml/schema/Campaign/Survey.xml index 0f8d394f9c..cca12a42aa 100644 --- a/xml/schema/Campaign/Survey.xml +++ b/xml/schema/Campaign/Survey.xml @@ -38,7 +38,6 @@ civicrm_campaign
id title - (end_date IS NULL OR end_date > NOW()) 3.3 diff --git a/xml/schema/Contribute/Contribution.xml b/xml/schema/Contribute/Contribution.xml index e85f2fe88d..bd3c6c62bc 100644 --- a/xml/schema/Contribute/Contribution.xml +++ b/xml/schema/Contribute/Contribution.xml @@ -397,14 +397,13 @@ campaign_id contribution_campaign_id int unsigned - Campaign ID + Campaign true The campaign for which this contribution has been triggered. civicrm_campaign
id title - (end_date IS NULL OR end_date > NOW())
3.4 diff --git a/xml/schema/Contribute/ContributionPage.xml b/xml/schema/Contribute/ContributionPage.xml index 2198475823..62673788a0 100644 --- a/xml/schema/Contribute/ContributionPage.xml +++ b/xml/schema/Contribute/ContributionPage.xml @@ -415,7 +415,6 @@ civicrm_campaign
id title - (end_date IS NULL OR end_date > NOW()) 3.4 diff --git a/xml/schema/Contribute/ContributionRecur.xml b/xml/schema/Contribute/ContributionRecur.xml index 61ff6c490a..8f11faaf38 100644 --- a/xml/schema/Contribute/ContributionRecur.xml +++ b/xml/schema/Contribute/ContributionRecur.xml @@ -292,14 +292,13 @@ campaign_id contribution_campaign_id int unsigned - Campaign ID + Campaign true The campaign for which this contribution has been triggered. civicrm_campaign
id title - (end_date IS NULL OR end_date > NOW())
4.1 diff --git a/xml/schema/Event/Event.xml b/xml/schema/Event/Event.xml index 664b4a2aeb..ec43866376 100644 --- a/xml/schema/Event/Event.xml +++ b/xml/schema/Event/Event.xml @@ -591,13 +591,12 @@ campaign_id int unsigned - Campaign ID + Campaign The campaign for which this event has been created. civicrm_campaign
id title - (end_date IS NULL OR end_date > NOW())
3.4
diff --git a/xml/schema/Event/Participant.xml b/xml/schema/Event/Participant.xml index c49d796b83..2561261f36 100644 --- a/xml/schema/Event/Participant.xml +++ b/xml/schema/Event/Participant.xml @@ -223,14 +223,13 @@ campaign_id participant_campaign_id int unsigned - Campaign ID + Campaign true The campaign for which this participant has been registered. civicrm_campaign
id title - (end_date IS NULL OR end_date > NOW())
3.4 diff --git a/xml/schema/Mailing/Mailing.xml b/xml/schema/Mailing/Mailing.xml index 47e90d2226..27ef77cf92 100644 --- a/xml/schema/Mailing/Mailing.xml +++ b/xml/schema/Mailing/Mailing.xml @@ -270,7 +270,6 @@ civicrm_campaign
id title - (end_date IS NULL OR end_date > NOW()) 3.4 diff --git a/xml/schema/Member/Membership.xml b/xml/schema/Member/Membership.xml index 37cc73000b..6e1383faf4 100644 --- a/xml/schema/Member/Membership.xml +++ b/xml/schema/Member/Membership.xml @@ -201,14 +201,13 @@ campaign_id member_campaign_id int unsigned - Campaign ID + Campaign true The campaign for which this membership is attached. civicrm_campaign
id title - (end_date IS NULL OR end_date > NOW())
3.4 diff --git a/xml/schema/Pledge/Pledge.xml b/xml/schema/Pledge/Pledge.xml index 4ca0f3e855..bc9b4928ba 100644 --- a/xml/schema/Pledge/Pledge.xml +++ b/xml/schema/Pledge/Pledge.xml @@ -274,14 +274,13 @@ campaign_id pledge_campaign_id int unsigned - Campaign ID + Campaign true The campaign for which this pledge has been initiated. civicrm_campaign
id title - (end_date IS NULL OR end_date > NOW())
3.4 -- 2.25.1