Skip to content

Commit

Permalink
Allow Manual Geo Code flag to be exported
Browse files Browse the repository at this point in the history
FIx Export tests by altering to include the manual_geo_code field
  • Loading branch information
seamuslee001 committed Aug 9, 2019
1 parent 920cc06 commit ced2ce2
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 37 deletions.
3 changes: 2 additions & 1 deletion 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:f3842d00e5f0c77491c9f9ff27db37d0)
*/

/**
Expand Down Expand Up @@ -712,6 +712,7 @@ public static function &fields() {
'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
1 change: 1 addition & 0 deletions xml/schema/Core/Address.xml
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@
<html>
<type>CheckBox</type>
</html>
<export>true</export>
</field>
<field>
<name>timezone</name>
Expand Down

0 comments on commit ced2ce2

Please sign in to comment.