CRM-15019 - avoid validation error on register date if not using ISO
authorJamie McClelland <jm@mayfirst.org>
Mon, 21 Jul 2014 17:25:11 +0000 (13:25 -0400)
committerJamie McClelland <jm@mayfirst.org>
Mon, 21 Jul 2014 17:25:11 +0000 (13:25 -0400)
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

CRM/Event/Import/Parser/Participant.php

index b48e980af44fbc2c50f93e615f95c0599be85304..168d738af692428636f8c7f08521a7849ca1e9d8 100644 (file)
@@ -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']);
+        }
       }
     }