diff --git a/xml/schema/Activity/Activity.xml b/xml/schema/Activity/Activity.xml index 98175f37830df9b96bb2ace98fca0c293f28a1ea..6757e7609723ac718add2d531bde90ce68ecc0ff 100644 --- a/xml/schema/Activity/Activity.xml +++ b/xml/schema/Activity/Activity.xml @@ -372,6 +372,12 @@ <title>Campaign ID</title> <import>true</import> <comment>The campaign for which this activity has been triggered.</comment> + <pseudoconstant> + <table>civicrm_campaign</table> + <keyColumn>id</keyColumn> + <labelColumn>title</labelColumn> + <condition>(end_date IS NULL OR end_date > NOW())</condition> + </pseudoconstant> <add>3.4</add> </field> <foreignKey> diff --git a/xml/schema/Campaign/CampaignGroup.xml b/xml/schema/Campaign/CampaignGroup.xml index b8cd70bd45f466045943a163b06ff6da8f517451..29e97c76ec5cbab979f0b94619dcd80d4910ff8a 100644 --- a/xml/schema/Campaign/CampaignGroup.xml +++ b/xml/schema/Campaign/CampaignGroup.xml @@ -23,6 +23,12 @@ <type>int unsigned</type> <required>true</required> <comment>Foreign key to the activity Campaign.</comment> + <pseudoconstant> + <table>civicrm_campaign</table> + <keyColumn>id</keyColumn> + <labelColumn>title</labelColumn> + <condition>(end_date IS NULL OR end_date > NOW())</condition> + </pseudoconstant> <add>3.3</add> </field> <foreignKey> diff --git a/xml/schema/Campaign/Survey.xml b/xml/schema/Campaign/Survey.xml index 893cd2702f6f486f66a223c31f439e0b1b79b5a7..0f8d394f9cbf5f487a7a3e0101c1445c64057e9c 100644 --- a/xml/schema/Campaign/Survey.xml +++ b/xml/schema/Campaign/Survey.xml @@ -34,6 +34,12 @@ <type>int unsigned</type> <default>NULL</default> <comment>Foreign key to the Campaign.</comment> + <pseudoconstant> + <table>civicrm_campaign</table> + <keyColumn>id</keyColumn> + <labelColumn>title</labelColumn> + <condition>(end_date IS NULL OR end_date > NOW())</condition> + </pseudoconstant> <add>3.3</add> </field> <foreignKey> diff --git a/xml/schema/Contribute/Contribution.xml b/xml/schema/Contribute/Contribution.xml index 0c868ae4e8a64df0564c4722aea49c12a609a581..e85f2fe88d94da948d59b4f6f93021462391152d 100644 --- a/xml/schema/Contribute/Contribution.xml +++ b/xml/schema/Contribute/Contribution.xml @@ -400,6 +400,12 @@ <title>Campaign ID</title> <import>true</import> <comment>The campaign for which this contribution has been triggered.</comment> + <pseudoconstant> + <table>civicrm_campaign</table> + <keyColumn>id</keyColumn> + <labelColumn>title</labelColumn> + <condition>(end_date IS NULL OR end_date > NOW())</condition> + </pseudoconstant> <add>3.4</add> </field> <foreignKey> diff --git a/xml/schema/Contribute/ContributionPage.xml b/xml/schema/Contribute/ContributionPage.xml index 10aa925d26a57910f3a5126aa4ab94ebc021548f..219847582374b712879a7db489ed5f80fe7ee000 100644 --- a/xml/schema/Contribute/ContributionPage.xml +++ b/xml/schema/Contribute/ContributionPage.xml @@ -411,6 +411,12 @@ <title>Contribution Page Campaign ID</title> <type>int unsigned</type> <comment>The campaign for which we are collecting contributions with this page.</comment> + <pseudoconstant> + <table>civicrm_campaign</table> + <keyColumn>id</keyColumn> + <labelColumn>title</labelColumn> + <condition>(end_date IS NULL OR end_date > NOW())</condition> + </pseudoconstant> <add>3.4</add> </field> <foreignKey> diff --git a/xml/schema/Contribute/ContributionRecur.xml b/xml/schema/Contribute/ContributionRecur.xml index 5be85af26010416dea5360b384b8e641bcea0d3e..61ff6c490a81a074143789b0c48e80a57097bcf4 100644 --- a/xml/schema/Contribute/ContributionRecur.xml +++ b/xml/schema/Contribute/ContributionRecur.xml @@ -295,6 +295,12 @@ <title>Campaign ID</title> <import>true</import> <comment>The campaign for which this contribution has been triggered.</comment> + <pseudoconstant> + <table>civicrm_campaign</table> + <keyColumn>id</keyColumn> + <labelColumn>title</labelColumn> + <condition>(end_date IS NULL OR end_date > NOW())</condition> + </pseudoconstant> <add>4.1</add> </field> <foreignKey> diff --git a/xml/schema/Event/Event.xml b/xml/schema/Event/Event.xml index 4ed896a34327e002bc760ab1736565b9b0901516..664b4a2aebb79ca1ebb3f01200bc14cde38c1a89 100644 --- a/xml/schema/Event/Event.xml +++ b/xml/schema/Event/Event.xml @@ -593,6 +593,12 @@ <type>int unsigned</type> <title>Campaign ID</title> <comment>The campaign for which this event has been created.</comment> + <pseudoconstant> + <table>civicrm_campaign</table> + <keyColumn>id</keyColumn> + <labelColumn>title</labelColumn> + <condition>(end_date IS NULL OR end_date > NOW())</condition> + </pseudoconstant> <add>3.4</add> </field> <foreignKey> diff --git a/xml/schema/Event/Participant.xml b/xml/schema/Event/Participant.xml index 728bf474f43818500c8cddc40dfc36b31b37a15f..c49d796b8335dc50d233810593144c04907c28ff 100644 --- a/xml/schema/Event/Participant.xml +++ b/xml/schema/Event/Participant.xml @@ -226,6 +226,12 @@ <title>Campaign ID</title> <import>true</import> <comment>The campaign for which this participant has been registered.</comment> + <pseudoconstant> + <table>civicrm_campaign</table> + <keyColumn>id</keyColumn> + <labelColumn>title</labelColumn> + <condition>(end_date IS NULL OR end_date > NOW())</condition> + </pseudoconstant> <add>3.4</add> </field> <foreignKey> diff --git a/xml/schema/Mailing/Mailing.xml b/xml/schema/Mailing/Mailing.xml index 7a7df67a684fbb1fba91a484a304f6eb79f136ed..47e90d2226099d54df472ae63b707d13f90ce42c 100644 --- a/xml/schema/Mailing/Mailing.xml +++ b/xml/schema/Mailing/Mailing.xml @@ -266,6 +266,12 @@ <name>campaign_id</name> <type>int unsigned</type> <comment>The campaign for which this mailing has been initiated.</comment> + <pseudoconstant> + <table>civicrm_campaign</table> + <keyColumn>id</keyColumn> + <labelColumn>title</labelColumn> + <condition>(end_date IS NULL OR end_date > NOW())</condition> + </pseudoconstant> <add>3.4</add> </field> <foreignKey> diff --git a/xml/schema/Member/Membership.xml b/xml/schema/Member/Membership.xml index d94e6adf957f8670fe2c9b43e7a53cd6dea337ee..37cc73000bd05b56a03099c20b990650d0761117 100644 --- a/xml/schema/Member/Membership.xml +++ b/xml/schema/Member/Membership.xml @@ -204,6 +204,12 @@ <title>Campaign ID</title> <import>true</import> <comment>The campaign for which this membership is attached.</comment> + <pseudoconstant> + <table>civicrm_campaign</table> + <keyColumn>id</keyColumn> + <labelColumn>title</labelColumn> + <condition>(end_date IS NULL OR end_date > NOW())</condition> + </pseudoconstant> <add>3.4</add> </field> <foreignKey> diff --git a/xml/schema/Pledge/Pledge.xml b/xml/schema/Pledge/Pledge.xml index 77f737aab26aee051d4bdda28db8e16ed7773c9b..4ca0f3e8554f469e58e4d10af0c44031d6dfdee4 100644 --- a/xml/schema/Pledge/Pledge.xml +++ b/xml/schema/Pledge/Pledge.xml @@ -277,6 +277,12 @@ <title>Campaign ID</title> <import>true</import> <comment>The campaign for which this pledge has been initiated.</comment> + <pseudoconstant> + <table>civicrm_campaign</table> + <keyColumn>id</keyColumn> + <labelColumn>title</labelColumn> + <condition>(end_date IS NULL OR end_date > NOW())</condition> + </pseudoconstant> <add>3.4</add> </field> <foreignKey>