Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
dc92d44e
Unverified
Commit
dc92d44e
authored
5 years ago
by
Seamus Lee
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #16240 from MegaphoneJon/core-1512
#1512
: Address ID should be exportable
parents
af1fcb5b
7e18723f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CRM/Core/DAO/Address.php
+3
-2
3 additions, 2 deletions
CRM/Core/DAO/Address.php
tests/phpunit/CRM/Export/BAO/ExportTest.php
+167
-164
167 additions, 164 deletions
tests/phpunit/CRM/Export/BAO/ExportTest.php
xml/schema/Core/Address.xml
+2
-0
2 additions, 0 deletions
xml/schema/Core/Address.xml
with
172 additions
and
166 deletions
CRM/Core/DAO/Address.php
+
3
−
2
View file @
dc92d44e
...
...
@@ -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'
,
...
...
This diff is collapsed.
Click to expand it.
tests/phpunit/CRM/Export/BAO/ExportTest.php
+
167
−
164
View file @
dc92d44e
...
...
@@ -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
[
8
1
=>
'Activity ID'
,
8
2
=>
'Activity Type'
,
8
3
=>
'Activity Type ID'
,
8
4
=>
'Subject'
,
8
5
=>
'Activity Date'
,
8
6
=>
'Duration'
,
8
7
=>
'Location'
,
8
8
=>
'Details'
,
8
9
=>
'Activity Status'
,
9
0
=>
'Activity Priority'
,
9
1
=>
'Source Contact'
,
9
2
=>
'source_record_id'
,
9
3
=>
'Test'
,
9
4
=>
'Campaign ID'
,
9
5
=>
'result'
,
9
6
=>
'Engagement Index'
,
9
7
=>
'parent_id'
,
8
2
=>
'Activity ID'
,
8
3
=>
'Activity Type'
,
8
4
=>
'Activity Type ID'
,
8
5
=>
'Subject'
,
8
6
=>
'Activity Date'
,
8
7
=>
'Duration'
,
8
8
=>
'Location'
,
8
9
=>
'Details'
,
9
0
=>
'Activity Status'
,
9
1
=>
'Activity Priority'
,
9
2
=>
'Source Contact'
,
9
3
=>
'source_record_id'
,
9
4
=>
'Test'
,
9
5
=>
'Campaign ID'
,
9
6
=>
'result'
,
9
7
=>
'Engagement Index'
,
9
8
=>
'parent_id'
,
];
}
...
...
@@ -2329,25 +2331,25 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
*/
protected
function
getCaseHeaderDefinition
()
{
return
[
8
1
=>
'Contact ID'
,
8
2
=>
'Case ID'
,
8
3
=>
'case_activity_subject'
,
8
4
=>
'Case Subject'
,
8
5
=>
'Case Status'
,
8
6
=>
'Case Type'
,
8
7
=>
'Role in Case'
,
8
8
=>
'Case is in the Trash'
,
8
9
=>
'case_recent_activity_date'
,
9
0
=>
'case_recent_activity_type'
,
9
1
=>
'case_scheduled_activity_date'
,
9
2
=>
'Case Start Date'
,
9
3
=>
'Case End Date'
,
9
4
=>
'case_source_contact_id'
,
9
5
=>
'case_activity_status'
,
9
6
=>
'case_activity_duration'
,
9
7
=>
'case_activity_medium_id'
,
9
8
=>
'case_activity_details'
,
99
=>
'case_activity_is_auto'
,
8
2
=>
'Contact ID'
,
8
3
=>
'Case ID'
,
8
4
=>
'case_activity_subject'
,
8
5
=>
'Case Subject'
,
8
6
=>
'Case Status'
,
8
7
=>
'Case Type'
,
8
8
=>
'Role in Case'
,
8
9
=>
'Case is in the Trash'
,
9
0
=>
'case_recent_activity_date'
,
9
1
=>
'case_recent_activity_type'
,
9
2
=>
'case_scheduled_activity_date'
,
9
3
=>
'Case Start Date'
,
9
4
=>
'Case End Date'
,
9
5
=>
'case_source_contact_id'
,
9
6
=>
'case_activity_status'
,
9
7
=>
'case_activity_duration'
,
9
8
=>
'case_activity_medium_id'
,
9
9
=>
'case_activity_details'
,
100
=>
'case_activity_is_auto'
,
];
}
...
...
@@ -2358,39 +2360,39 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
*/
protected
function
getContributeHeaderDefinition
()
{
return
[
8
1
=>
'Financial Type'
,
8
2
=>
'Contribution Source'
,
8
3
=>
'Date Received'
,
8
4
=>
'Thank-you Date'
,
8
5
=>
'Cancelled / Refunded Date'
,
8
6
=>
'Total Amount'
,
8
7
=>
'Accounting Code'
,
8
8
=>
'Payment Methods'
,
8
9
=>
'Payment Method ID'
,
9
0
=>
'Check Number'
,
9
1
=>
'Non-deductible Amount'
,
9
2
=>
'Fee Amount'
,
9
3
=>
'Net Amount'
,
9
4
=>
'Transaction ID'
,
9
5
=>
'Invoice Reference'
,
9
6
=>
'Invoice Number'
,
9
7
=>
'Currency'
,
9
8
=>
'Cancellation / Refund Reason'
,
99
=>
'Receipt Date'
,
10
0
=>
'Test'
,
10
1
=>
'Is Pay Later'
,
10
2
=>
'Contribution Status'
,
10
3
=>
'Recurring Contribution ID'
,
10
4
=>
'Amount Label'
,
10
5
=>
'Contribution Note'
,
10
6
=>
'Batch Name'
,
10
7
=>
'Campaign Title'
,
10
8
=>
'Campaign ID'
,
10
9
=>
'Soft Credit For'
,
11
0
=>
'Soft Credit Amount'
,
11
1
=>
'Soft Credit Type'
,
11
2
=>
'Soft Credit For Contact ID'
,
11
3
=>
'Soft Credit For Contribution ID'
,
8
2
=>
'Financial Type'
,
8
3
=>
'Contribution Source'
,
8
4
=>
'Date Received'
,
8
5
=>
'Thank-you Date'
,
8
6
=>
'Cancelled / Refunded Date'
,
8
7
=>
'Total Amount'
,
8
8
=>
'Accounting Code'
,
8
9
=>
'Payment Methods'
,
9
0
=>
'Payment Method ID'
,
9
1
=>
'Check Number'
,
9
2
=>
'Non-deductible Amount'
,
9
3
=>
'Fee Amount'
,
9
4
=>
'Net Amount'
,
9
5
=>
'Transaction ID'
,
9
6
=>
'Invoice Reference'
,
9
7
=>
'Invoice Number'
,
9
8
=>
'Currency'
,
9
9
=>
'Cancellation / Refund Reason'
,
100
=>
'Receipt Date'
,
10
1
=>
'Test'
,
10
2
=>
'Is Pay Later'
,
10
3
=>
'Contribution Status'
,
10
4
=>
'Recurring Contribution ID'
,
10
5
=>
'Amount Label'
,
10
6
=>
'Contribution Note'
,
10
7
=>
'Batch Name'
,
10
8
=>
'Campaign Title'
,
10
9
=>
'Campaign ID'
,
1
1
0
=>
'Soft Credit For'
,
11
1
=>
'Soft Credit Amount'
,
11
2
=>
'Soft Credit Type'
,
11
3
=>
'Soft Credit For Contact ID'
,
11
4
=>
'Soft Credit For Contribution ID'
,
];
}
...
...
@@ -2401,27 +2403,27 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
*/
protected
function
getParticipantHeaderDefinition
()
{
return
[
8
1
=>
'Event'
,
8
2
=>
'Event Title'
,
8
3
=>
'Event Start Date'
,
8
4
=>
'Event End Date'
,
8
5
=>
'Event Type'
,
8
6
=>
'Participant ID'
,
8
7
=>
'Participant Status'
,
8
8
=>
'Participant Status Id'
,
8
9
=>
'Participant Role'
,
9
0
=>
'Participant Role Id'
,
9
1
=>
'Participant Note'
,
9
2
=>
'Register date'
,
9
3
=>
'Participant Source'
,
9
4
=>
'Fee level'
,
9
5
=>
'Test'
,
9
6
=>
'Is Pay Later'
,
9
7
=>
'Fee Amount'
,
9
8
=>
'Discount Name'
,
99
=>
'Fee Currency'
,
10
0
=>
'Registered By ID'
,
10
1
=>
'Campaign ID'
,
8
2
=>
'Event'
,
8
3
=>
'Event Title'
,
8
4
=>
'Event Start Date'
,
8
5
=>
'Event End Date'
,
8
6
=>
'Event Type'
,
8
7
=>
'Participant ID'
,
8
8
=>
'Participant Status'
,
8
9
=>
'Participant Status Id'
,
9
0
=>
'Participant Role'
,
9
1
=>
'Participant Role Id'
,
9
2
=>
'Participant Note'
,
9
3
=>
'Register date'
,
9
4
=>
'Participant Source'
,
9
5
=>
'Fee level'
,
9
6
=>
'Test'
,
9
7
=>
'Is Pay Later'
,
9
8
=>
'Fee Amount'
,
9
9
=>
'Discount Name'
,
100
=>
'Fee Currency'
,
10
1
=>
'Registered By ID'
,
10
2
=>
'Campaign ID'
,
];
}
...
...
@@ -2432,20 +2434,20 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
*/
protected
function
getMemberHeaderDefinition
()
{
return
[
8
1
=>
'Membership Type'
,
8
2
=>
'Test'
,
8
3
=>
'Is Pay Later'
,
8
4
=>
'Member Since'
,
8
5
=>
'Membership Start Date'
,
8
6
=>
'Membership Expiration Date'
,
8
7
=>
'Source'
,
8
8
=>
'Membership Status'
,
8
9
=>
'Membership ID'
,
9
0
=>
'Primary Member ID'
,
9
1
=>
'Max Related'
,
9
2
=>
'Membership Recurring Contribution'
,
9
3
=>
'Campaign ID'
,
9
4
=>
'Status Override'
,
8
2
=>
'Membership Type'
,
8
3
=>
'Test'
,
8
4
=>
'Is Pay Later'
,
8
5
=>
'Member Since'
,
8
6
=>
'Membership Start Date'
,
8
7
=>
'Membership Expiration Date'
,
8
8
=>
'Source'
,
8
9
=>
'Membership Status'
,
9
0
=>
'Membership ID'
,
9
1
=>
'Primary Member ID'
,
9
2
=>
'Max Related'
,
9
3
=>
'Membership Recurring Contribution'
,
9
4
=>
'Campaign ID'
,
9
5
=>
'Status Override'
,
];
}
...
...
@@ -2456,30 +2458,30 @@ class CRM_Export_BAO_ExportTest extends CiviUnitTestCase {
*/
protected
function
getPledgeHeaderDefinition
()
{
return
[
8
1
=>
'Pledge ID'
,
8
2
=>
'Total Pledged'
,
8
3
=>
'Total Paid'
,
8
4
=>
'Pledge Made'
,
8
5
=>
'Pledge Start Date'
,
8
6
=>
'Next Payment Date'
,
8
7
=>
'Next Payment Amount'
,
8
8
=>
'Pledge Status'
,
8
9
=>
'Test'
,
9
0
=>
'Pledge Contribution Page Id'
,
9
1
=>
'pledge_financial_type'
,
9
2
=>
'Pledge Frequency Interval'
,
9
3
=>
'Pledge Frequency Unit'
,
9
4
=>
'pledge_currency'
,
9
5
=>
'Campaign ID'
,
9
6
=>
'Balance Amount'
,
9
7
=>
'Payment ID'
,
9
8
=>
'Scheduled Amount'
,
99
=>
'Scheduled Date'
,
10
0
=>
'Paid Amount'
,
10
1
=>
'Paid Date'
,
10
2
=>
'Last Reminder'
,
10
3
=>
'Reminders Sent'
,
10
4
=>
'Pledge Payment Status'
,
8
2
=>
'Pledge ID'
,
8
3
=>
'Total Pledged'
,
8
4
=>
'Total Paid'
,
8
5
=>
'Pledge Made'
,
8
6
=>
'Pledge Start Date'
,
8
7
=>
'Next Payment Date'
,
8
8
=>
'Next Payment Amount'
,
8
9
=>
'Pledge Status'
,
9
0
=>
'Test'
,
9
1
=>
'Pledge Contribution Page Id'
,
9
2
=>
'pledge_financial_type'
,
9
3
=>
'Pledge Frequency Interval'
,
9
4
=>
'Pledge Frequency Unit'
,
9
5
=>
'pledge_currency'
,
9
6
=>
'Campaign ID'
,
9
7
=>
'Balance Amount'
,
9
8
=>
'Payment ID'
,
9
9
=>
'Scheduled Amount'
,
100
=>
'Scheduled Date'
,
10
1
=>
'Paid Amount'
,
10
2
=>
'Paid Date'
,
10
3
=>
'Last Reminder'
,
10
4
=>
'Reminders Sent'
,
10
5
=>
'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)'
,
...
...
This diff is collapsed.
Click to expand it.
xml/schema/Core/Address.xml
+
2
−
0
View file @
dc92d44e
...
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment