Skip to content
Snippets Groups Projects
Unverified Commit dc92d44e authored by Seamus Lee's avatar Seamus Lee Committed by GitHub
Browse files

Merge pull request #16240 from MegaphoneJon/core-1512

#1512: Address ID should be exportable
parents af1fcb5b 7e18723f
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Core/Address.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:c53b9ecace9b92f598172ccd17620489)
* (GenCodeChecksum:6dabc95988fa66837c8f90b4ac68901c)
*/
/**
......@@ -266,13 +266,14 @@ class CRM_Core_DAO_Address extends CRM_Core_DAO {
public static function &fields() {
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
Civi::$statics[__CLASS__]['fields'] = [
'id' => [
'address_id' => [
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Address ID'),
'description' => ts('Unique Address ID'),
'required' => TRUE,
'where' => 'civicrm_address.id',
'export' => TRUE,
'table_name' => 'civicrm_address',
'entity' => 'Address',
'bao' => 'CRM_Core_BAO_Address',
......
......@@ -1565,6 +1565,7 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
'postal_greeting' => 1,
'current_employer' => 1,
'location_type' => 1,
'address_id' => 1,
'street_address' => 1,
'street_number' => 1,
'street_number_suffix' => 1,
......@@ -2251,46 +2252,47 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
46 => 'Postal Greeting',
47 => 'Current Employer',
48 => 'Location Type',
49 => 'Street Address',
50 => 'Street Number',
51 => 'Street Number Suffix',
52 => 'Street Name',
53 => 'Street Unit',
54 => 'Supplemental Address 1',
55 => 'Supplemental Address 2',
56 => 'Supplemental Address 3',
57 => 'City',
58 => 'Postal Code Suffix',
59 => 'Postal Code',
60 => 'Latitude',
61 => 'Longitude',
62 => 'Is Manually Geocoded',
63 => 'Address Name',
64 => 'Master Address Belongs To',
65 => 'County',
66 => 'State',
67 => 'Country',
68 => 'Phone',
69 => 'Phone Extension',
70 => 'Phone Type',
71 => 'Email',
72 => 'On Hold',
73 => 'Use for Bulk Mail',
74 => 'Signature Text',
75 => 'Signature Html',
76 => 'IM Provider',
77 => 'IM Screen Name',
78 => 'OpenID',
79 => 'World Region',
80 => 'Website',
81 => 'Group(s)',
82 => 'Tag(s)',
83 => 'Note(s)',
49 => 'Address ID',
50 => 'Street Address',
51 => 'Street Number',
52 => 'Street Number Suffix',
53 => 'Street Name',
54 => 'Street Unit',
55 => 'Supplemental Address 1',
56 => 'Supplemental Address 2',
57 => 'Supplemental Address 3',
58 => 'City',
59 => 'Postal Code Suffix',
60 => 'Postal Code',
61 => 'Latitude',
62 => 'Longitude',
63 => 'Is Manually Geocoded',
64 => 'Address Name',
65 => 'Master Address Belongs To',
66 => 'County',
67 => 'State',
68 => 'Country',
69 => 'Phone',
70 => 'Phone Extension',
71 => 'Phone Type',
72 => 'Email',
73 => 'On Hold',
74 => 'Use for Bulk Mail',
75 => 'Signature Text',
76 => 'Signature Html',
77 => 'IM Provider',
78 => 'IM Screen Name',
79 => 'OpenID',
80 => 'World Region',
81 => 'Website',
82 => 'Group(s)',
83 => 'Tag(s)',
84 => 'Note(s)',
];
if (!$isContactExport) {
unset($headers[81]);
unset($headers[82]);
unset($headers[83]);
unset($headers[84]);
}
return $headers;
}
......@@ -2302,23 +2304,23 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
*/
protected function getActivityHeaderDefinition() {
return [
81 => 'Activity ID',
82 => 'Activity Type',
83 => 'Activity Type ID',
84 => 'Subject',
85 => 'Activity Date',
86 => 'Duration',
87 => 'Location',
88 => 'Details',
89 => 'Activity Status',
90 => 'Activity Priority',
91 => 'Source Contact',
92 => 'source_record_id',
93 => 'Test',
94 => 'Campaign ID',
95 => 'result',
96 => 'Engagement Index',
97 => 'parent_id',
82 => 'Activity ID',
83 => 'Activity Type',
84 => 'Activity Type ID',
85 => 'Subject',
86 => 'Activity Date',
87 => 'Duration',
88 => 'Location',
89 => 'Details',
90 => 'Activity Status',
91 => 'Activity Priority',
92 => 'Source Contact',
93 => 'source_record_id',
94 => 'Test',
95 => 'Campaign ID',
96 => 'result',
97 => 'Engagement Index',
98 => 'parent_id',
];
}
......@@ -2329,25 +2331,25 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
*/
protected function getCaseHeaderDefinition() {
return [
81 => 'Contact ID',
82 => 'Case ID',
83 => 'case_activity_subject',
84 => 'Case Subject',
85 => 'Case Status',
86 => 'Case Type',
87 => 'Role in Case',
88 => 'Case is in the Trash',
89 => 'case_recent_activity_date',
90 => 'case_recent_activity_type',
91 => 'case_scheduled_activity_date',
92 => 'Case Start Date',
93 => 'Case End Date',
94 => 'case_source_contact_id',
95 => 'case_activity_status',
96 => 'case_activity_duration',
97 => 'case_activity_medium_id',
98 => 'case_activity_details',
99 => 'case_activity_is_auto',
82 => 'Contact ID',
83 => 'Case ID',
84 => 'case_activity_subject',
85 => 'Case Subject',
86 => 'Case Status',
87 => 'Case Type',
88 => 'Role in Case',
89 => 'Case is in the Trash',
90 => 'case_recent_activity_date',
91 => 'case_recent_activity_type',
92 => 'case_scheduled_activity_date',
93 => 'Case Start Date',
94 => 'Case End Date',
95 => 'case_source_contact_id',
96 => 'case_activity_status',
97 => 'case_activity_duration',
98 => 'case_activity_medium_id',
99 => 'case_activity_details',
100 => 'case_activity_is_auto',
];
}
......@@ -2358,39 +2360,39 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
*/
protected function getContributeHeaderDefinition() {
return [
81 => 'Financial Type',
82 => 'Contribution Source',
83 => 'Date Received',
84 => 'Thank-you Date',
85 => 'Cancelled / Refunded Date',
86 => 'Total Amount',
87 => 'Accounting Code',
88 => 'Payment Methods',
89 => 'Payment Method ID',
90 => 'Check Number',
91 => 'Non-deductible Amount',
92 => 'Fee Amount',
93 => 'Net Amount',
94 => 'Transaction ID',
95 => 'Invoice Reference',
96 => 'Invoice Number',
97 => 'Currency',
98 => 'Cancellation / Refund Reason',
99 => 'Receipt Date',
100 => 'Test',
101 => 'Is Pay Later',
102 => 'Contribution Status',
103 => 'Recurring Contribution ID',
104 => 'Amount Label',
105 => 'Contribution Note',
106 => 'Batch Name',
107 => 'Campaign Title',
108 => 'Campaign ID',
109 => 'Soft Credit For',
110 => 'Soft Credit Amount',
111 => 'Soft Credit Type',
112 => 'Soft Credit For Contact ID',
113 => 'Soft Credit For Contribution ID',
82 => 'Financial Type',
83 => 'Contribution Source',
84 => 'Date Received',
85 => 'Thank-you Date',
86 => 'Cancelled / Refunded Date',
87 => 'Total Amount',
88 => 'Accounting Code',
89 => 'Payment Methods',
90 => 'Payment Method ID',
91 => 'Check Number',
92 => 'Non-deductible Amount',
93 => 'Fee Amount',
94 => 'Net Amount',
95 => 'Transaction ID',
96 => 'Invoice Reference',
97 => 'Invoice Number',
98 => 'Currency',
99 => 'Cancellation / Refund Reason',
100 => 'Receipt Date',
101 => 'Test',
102 => 'Is Pay Later',
103 => 'Contribution Status',
104 => 'Recurring Contribution ID',
105 => 'Amount Label',
106 => 'Contribution Note',
107 => 'Batch Name',
108 => 'Campaign Title',
109 => 'Campaign ID',
110 => 'Soft Credit For',
111 => 'Soft Credit Amount',
112 => 'Soft Credit Type',
113 => 'Soft Credit For Contact ID',
114 => 'Soft Credit For Contribution ID',
];
}
......@@ -2401,27 +2403,27 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
*/
protected function getParticipantHeaderDefinition() {
return [
81 => 'Event',
82 => 'Event Title',
83 => 'Event Start Date',
84 => 'Event End Date',
85 => 'Event Type',
86 => 'Participant ID',
87 => 'Participant Status',
88 => 'Participant Status Id',
89 => 'Participant Role',
90 => 'Participant Role Id',
91 => 'Participant Note',
92 => 'Register date',
93 => 'Participant Source',
94 => 'Fee level',
95 => 'Test',
96 => 'Is Pay Later',
97 => 'Fee Amount',
98 => 'Discount Name',
99 => 'Fee Currency',
100 => 'Registered By ID',
101 => 'Campaign ID',
82 => 'Event',
83 => 'Event Title',
84 => 'Event Start Date',
85 => 'Event End Date',
86 => 'Event Type',
87 => 'Participant ID',
88 => 'Participant Status',
89 => 'Participant Status Id',
90 => 'Participant Role',
91 => 'Participant Role Id',
92 => 'Participant Note',
93 => 'Register date',
94 => 'Participant Source',
95 => 'Fee level',
96 => 'Test',
97 => 'Is Pay Later',
98 => 'Fee Amount',
99 => 'Discount Name',
100 => 'Fee Currency',
101 => 'Registered By ID',
102 => 'Campaign ID',
];
}
......@@ -2432,20 +2434,20 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
*/
protected function getMemberHeaderDefinition() {
return [
81 => 'Membership Type',
82 => 'Test',
83 => 'Is Pay Later',
84 => 'Member Since',
85 => 'Membership Start Date',
86 => 'Membership Expiration Date',
87 => 'Source',
88 => 'Membership Status',
89 => 'Membership ID',
90 => 'Primary Member ID',
91 => 'Max Related',
92 => 'Membership Recurring Contribution',
93 => 'Campaign ID',
94 => 'Status Override',
82 => 'Membership Type',
83 => 'Test',
84 => 'Is Pay Later',
85 => 'Member Since',
86 => 'Membership Start Date',
87 => 'Membership Expiration Date',
88 => 'Source',
89 => 'Membership Status',
90 => 'Membership ID',
91 => 'Primary Member ID',
92 => 'Max Related',
93 => 'Membership Recurring Contribution',
94 => 'Campaign ID',
95 => 'Status Override',
];
}
......@@ -2456,30 +2458,30 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
*/
protected function getPledgeHeaderDefinition() {
return [
81 => 'Pledge ID',
82 => 'Total Pledged',
83 => 'Total Paid',
84 => 'Pledge Made',
85 => 'Pledge Start Date',
86 => 'Next Payment Date',
87 => 'Next Payment Amount',
88 => 'Pledge Status',
89 => 'Test',
90 => 'Pledge Contribution Page Id',
91 => 'pledge_financial_type',
92 => 'Pledge Frequency Interval',
93 => 'Pledge Frequency Unit',
94 => 'pledge_currency',
95 => 'Campaign ID',
96 => 'Balance Amount',
97 => 'Payment ID',
98 => 'Scheduled Amount',
99 => 'Scheduled Date',
100 => 'Paid Amount',
101 => 'Paid Date',
102 => 'Last Reminder',
103 => 'Reminders Sent',
104 => 'Pledge Payment Status',
82 => 'Pledge ID',
83 => 'Total Pledged',
84 => 'Total Paid',
85 => 'Pledge Made',
86 => 'Pledge Start Date',
87 => 'Next Payment Date',
88 => 'Next Payment Amount',
89 => 'Pledge Status',
90 => 'Test',
91 => 'Pledge Contribution Page Id',
92 => 'pledge_financial_type',
93 => 'Pledge Frequency Interval',
94 => 'Pledge Frequency Unit',
95 => 'pledge_currency',
96 => 'Campaign ID',
97 => 'Balance Amount',
98 => 'Payment ID',
99 => 'Scheduled Amount',
100 => 'Scheduled Date',
101 => 'Paid Amount',
102 => 'Paid Date',
103 => 'Last Reminder',
104 => 'Reminders Sent',
105 => 'Pledge Payment Status',
];
}
......@@ -2541,6 +2543,7 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
'postal_greeting' => '`postal_greeting` varchar(255)',
'current_employer' => '`current_employer` varchar(128)',
'location_type' => '`location_type` text',
'address_id' => '`address_id` varchar(16)',
'street_address' => '`street_address` varchar(96)',
'street_number' => '`street_number` varchar(16)',
'street_number_suffix' => '`street_number_suffix` varchar(8)',
......
......@@ -9,7 +9,9 @@
<log>true</log>
<field>
<name>id</name>
<uniqueName>address_id</uniqueName>
<type>int unsigned</type>
<export>true</export>
<title>Address ID</title>
<required>true</required>
<comment>Unique Address ID</comment>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment