From 1338f0b15488f3b447b01995046f319619c2fafc Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Tue, 12 Nov 2013 09:45:59 -0800 Subject: [PATCH] CRM-13739 - Transaction ID limited to 16chars when exporting event participations http://issues.civicrm.org/jira/browse/CRM-13739 --- CRM/Export/BAO/Export.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CRM/Export/BAO/Export.php b/CRM/Export/BAO/Export.php index d82899b468..cc3514a5ed 100644 --- a/CRM/Export/BAO/Export.php +++ b/CRM/Export/BAO/Export.php @@ -1276,7 +1276,19 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c } else { if (substr($fieldName, -3, 3) == '_id') { - $sqlColumns[$fieldName] = "$fieldName varchar(16)"; + // for trxn_id and its variants use a longer buffer + // to accomodate different systems - CRM-13739 + static $notRealIDFields = NULL; + if ($notRealIDFields == NULL) { + $notRealIDFields = array( 'trxn_id', 'componentpaymentfield_transaction_id' ); + } + + if (in_array($fieldName, $notRealIDFields)) { + $sqlColumns[$fieldName] = "$fieldName varchar(255)"; + } + else { + $sqlColumns[$fieldName] = "$fieldName varchar(16)"; + } } else { $changeFields = array( -- 2.25.1