Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Manual Geo Code flag to be exported #14998

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CRM/Core/DAO/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Core/Address.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:9cc91d1b8831b712698603b619aa1906)
* (GenCodeChecksum:e026e63074a6ffc2f4fda166e6ea6b5a)
*/

/**
Expand Down Expand Up @@ -709,9 +709,10 @@ public static function &fields() {
'manual_geo_code' => [
'name' => 'manual_geo_code',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Is manually geocoded'),
'title' => ts('Is Manually Geocoded'),
'description' => ts('Is this a manually entered geo code'),
'where' => 'civicrm_address.manual_geo_code',
'export' => TRUE,
'default' => '0',
'table_name' => 'civicrm_address',
'entity' => 'Address',
Expand Down
75 changes: 39 additions & 36 deletions tests/phpunit/CRM/Export/BAO/ExportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1500,6 +1500,7 @@ protected function getBasicReturnProperties($isContactMode) {
'postal_code' => 1,
'geo_code_1' => 1,
'geo_code_2' => 1,
'manual_geo_code' => 1,
'address_name' => 1,
'master_id' => 1,
'county' => 1,
Expand Down Expand Up @@ -2183,32 +2184,33 @@ protected function getBasicHeaderDefinition($isContactExport) {
59 => 'Postal Code',
60 => 'Latitude',
61 => 'Longitude',
62 => 'Address Name',
63 => 'Master Address Belongs To',
64 => 'County',
65 => 'State',
66 => 'Country',
67 => 'Phone',
68 => 'Phone Extension',
69 => 'Phone Type',
70 => 'Email',
71 => 'On Hold',
72 => 'Use for Bulk Mail',
73 => 'Signature Text',
74 => 'Signature Html',
75 => 'IM Provider',
76 => 'IM Screen Name',
77 => 'OpenID',
78 => 'World Region',
79 => 'Website',
80 => 'Group(s)',
81 => 'Tag(s)',
82 => 'Note(s)',
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)',
];
if (!$isContactExport) {
unset($headers[80]);
unset($headers[81]);
unset($headers[82]);
unset($headers[83]);
}
return $headers;
}
Expand Down Expand Up @@ -2295,20 +2297,20 @@ protected function getContributeHeaderDefinition() {
97 => 'Currency',
98 => 'Cancellation / Refund Reason',
99 => 'Receipt Date',
106 => 'Test',
107 => 'Is Pay Later',
108 => 'Contribution Status',
109 => 'Recurring Contribution ID',
110 => 'Amount Label',
111 => 'Contribution Note',
112 => 'Batch Name',
113 => 'Campaign Title',
114 => 'Campaign ID',
116 => 'Soft Credit For',
117 => 'Soft Credit Amount',
118 => 'Soft Credit Type',
119 => 'Soft Credit For Contact ID',
120 => 'Soft Credit For Contribution ID',
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',
];
}

Expand Down Expand Up @@ -2472,6 +2474,7 @@ protected function getBasicSqlColumnDefinition($isContactExport) {
'postal_code' => 'postal_code varchar(64)',
'geo_code_1' => 'geo_code_1 varchar(32)',
'geo_code_2' => 'geo_code_2 varchar(32)',
'manual_geo_code' => 'manual_geo_code varchar(16)',
'address_name' => 'address_name varchar(255)',
'master_id' => 'master_id varchar(128)',
'county' => 'county varchar(64)',
Expand Down
3 changes: 2 additions & 1 deletion xml/schema/Core/Address.xml
Original file line number Diff line number Diff line change
Expand Up @@ -394,14 +394,15 @@
</field>
<field>
<name>manual_geo_code</name>
<title>Is manually geocoded</title>
<title>Is Manually Geocoded</title>
<type>boolean</type>
<default>0</default>
<comment>Is this a manually entered geo code</comment>
<add>4.3</add>
<html>
<type>CheckBox</type>
</html>
<export>true</export>
</field>
<field>
<name>timezone</name>
Expand Down