From: Jamie McClelland Date: Mon, 21 Jul 2014 17:25:11 +0000 (-0400) Subject: CRM-15019 - avoid validation error on register date if not using ISO X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=39d87d1e80ad6ab583d978bf34d766401f81ccab;p=civicrm-core.git CRM-15019 - avoid validation error on register date if not using ISO date format. ---------------------------------------- * CRM-15019: Importing participant record with register date in a format other than YYYY-MM-DD results in validation error https://issues.civicrm.org/jira/browse/CRM-15019 --- diff --git a/CRM/Event/Import/Parser/Participant.php b/CRM/Event/Import/Parser/Participant.php index b48e980af4..168d738af6 100644 --- a/CRM/Event/Import/Parser/Participant.php +++ b/CRM/Event/Import/Parser/Participant.php @@ -299,6 +299,10 @@ class CRM_Event_Import_Parser_Participant extends CRM_Event_Import_Parser { $params[$key] = CRM_Utils_String::strtoboolstr($val); } } + if($key == 'participant_register_date') { + CRM_Utils_Date::convertToDefaultDate($params, $dateType, 'participant_register_date'); + $formatted['participant_register_date'] = CRM_Utils_Date::processDate($params['participant_register_date']); + } } }