This has the side effect of making it such that it only gets 16 char rather than 255. I thnk this is 'ok' here but there is a separate issue open to increase the varchar for all fields on export
*
* Generated from xml/schema/CRM/Core/Phone.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:661faad4886dd1a40784d465b906f447)
+ * (GenCodeChecksum:22802e5d7d8dfce93626004aaf6cd2e2)
*/
/**
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Phone Type'),
'description' => 'Which type of phone does this number belongs.',
+ 'export' => TRUE,
+ 'where' => 'civicrm_phone.phone_type_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
'table_name' => 'civicrm_phone',
'entity' => 'Phone',
'bao' => 'CRM_Core_BAO_Phone',
public static function setHeaderRows($field, $headerRows, $sqlColumns, $processor, $value, $phoneTypes, $imProviders, $relationQuery) {
$queryFields = $processor->getQueryFields();
- // Split campaign into 2 fields for id and title
- if (substr($field, -14) == 'campaign_title') {
- $headerRows[] = ts('Campaign Title');
- }
- elseif (substr($field, -11) == 'campaign_id') {
+ if (substr($field, -11) == 'campaign_id') {
+ // @todo - set this correctly in the xml rather than here.
$headerRows[] = ts('Campaign ID');
}
elseif (isset($queryFields[$field]['title'])) {
$headerRows[] = $queryFields[$field]['title'];
}
- elseif ($field == 'phone_type_id') {
- $headerRows[] = ts('Phone Type');
- }
elseif ($field == 'provider_id') {
+ // @todo - set this correctly in the xml rather than here.
$headerRows[] = ts('IM Service Provider');
}
elseif ($processor->isRelationshipTypeKey($field)) {
66 => 'Country',
67 => 'Phone',
68 => 'Phone Extension',
- 69 => 'Email',
- 70 => 'On Hold',
- 71 => 'Use for Bulk Mail',
- 72 => 'Signature Text',
- 73 => 'Signature Html',
- 74 => 'IM Provider',
- 75 => 'IM Screen Name',
- 76 => 'OpenID',
- 77 => 'World Region',
- 78 => 'Website',
- 79 => 'Group(s)',
- 80 => 'Tag(s)',
- 81 => 'Note(s)',
- 82 => 'Phone Type',
+ 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)',
83 => 'IM Service Provider',
];
if (!$isContactExport) {
- unset($headers[79]);
unset($headers[80]);
unset($headers[81]);
+ unset($headers[82]);
}
return $headers;
}
'country' => 'country varchar(64)',
'phone' => 'phone varchar(32)',
'phone_ext' => 'phone_ext varchar(16)',
+ 'phone_type_id' => 'phone_type_id varchar(16)',
'email' => 'email varchar(254)',
'on_hold' => 'on_hold varchar(16)',
'is_bulkmail' => 'is_bulkmail varchar(16)',
'groups' => 'groups text',
'tags' => 'tags text',
'notes' => 'notes text',
- 'phone_type_id' => 'phone_type_id varchar(255)',
'provider_id' => 'provider_id varchar(255)',
];
if (!$isContactExport) {
'openid' => 'openid varchar(255)',
'world_region' => 'world_region varchar(128)',
'url' => 'url varchar(128)',
- 'phone_type_id' => 'phone_type_id varchar(255)',
+ 'phone_type_id' => 'phone_type_id varchar(16)',
'provider_id' => 'provider_id varchar(255)',
'financial_type' => 'financial_type varchar(64)',
'contribution_source' => 'contribution_source varchar(255)',
<name>phone_type_id</name>
<title>Phone Type</title>
<type>int unsigned</type>
+ <export>true</export>
<comment>Which type of phone does this number belongs.</comment>
<pseudoconstant>
<optionGroupName>phone_type</optionGroupName>