Make the importer check the date format when importing tickets.
This commit is contained in:
parent
f0eaa51d3a
commit
a7c489e454
2 changed files with 12 additions and 2 deletions
|
|
@ -6,6 +6,7 @@
|
|||
- Enabled better month and year navigation in the YUI date picker. (Tom Beharrell)
|
||||
- fixed: Add the user's first day of week data to getWebguiProperties and get rid of some inline javascript in the Data and DateTime forms.
|
||||
- fixed #10544: AssetVersioning: child assets versions under uncommitted parent
|
||||
- fixed #10549: EMS import
|
||||
|
||||
7.7.11
|
||||
- Fixed a bug where empty version tags were not deleted. (Martin Kamerbeek / Oqapi)
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ use WebGUI::International;
|
|||
use WebGUI::Utility;
|
||||
use WebGUI::Workflow::Instance;
|
||||
use Tie::IxHash;
|
||||
|
||||
use Data::Dumper;
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -1552,7 +1552,7 @@ $|=1;
|
|||
my $first = 1;
|
||||
if (open my $file, "<", $storage->getPath($filename)) {
|
||||
$out->print("Processing file...\n",1);
|
||||
while (my $line = <$file>) {
|
||||
ROW: while (my $line = <$file>) {
|
||||
if ($first) {
|
||||
$first = 0;
|
||||
if ($ignoreFirst) {
|
||||
|
|
@ -1581,11 +1581,20 @@ $|=1;
|
|||
next unless isIn($field->{name}, @import);
|
||||
$out->print("\tAdding field ".$field->{label}."\n",1);
|
||||
my $type = $field->{type};
|
||||
##Force the use of Form::DateTime and MySQL Format
|
||||
if ($field->{name} eq 'startDate') {
|
||||
$type = 'dateTime';
|
||||
$field->{defaultValue} = '1999-05-24 17:30:00';
|
||||
}
|
||||
my $value = $validate->$type({
|
||||
name => $field->{name},
|
||||
defaultValue => $field->{defaultValue},
|
||||
options => $field->{options},
|
||||
},$row[$i]);
|
||||
if ($field->{name} eq 'startDate' && !$value) {
|
||||
$out->print('Skipping event on line '.$line.' due to bad date format');
|
||||
next ROW;
|
||||
}
|
||||
if ($field->{isMeta}) {
|
||||
$metadata->{$field->{label}} = $value;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue