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)
|
- 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: 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 #10544: AssetVersioning: child assets versions under uncommitted parent
|
||||||
|
- fixed #10549: EMS import
|
||||||
|
|
||||||
7.7.11
|
7.7.11
|
||||||
- Fixed a bug where empty version tags were not deleted. (Martin Kamerbeek / Oqapi)
|
- 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::Utility;
|
||||||
use WebGUI::Workflow::Instance;
|
use WebGUI::Workflow::Instance;
|
||||||
use Tie::IxHash;
|
use Tie::IxHash;
|
||||||
|
use Data::Dumper;
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
@ -1552,7 +1552,7 @@ $|=1;
|
||||||
my $first = 1;
|
my $first = 1;
|
||||||
if (open my $file, "<", $storage->getPath($filename)) {
|
if (open my $file, "<", $storage->getPath($filename)) {
|
||||||
$out->print("Processing file...\n",1);
|
$out->print("Processing file...\n",1);
|
||||||
while (my $line = <$file>) {
|
ROW: while (my $line = <$file>) {
|
||||||
if ($first) {
|
if ($first) {
|
||||||
$first = 0;
|
$first = 0;
|
||||||
if ($ignoreFirst) {
|
if ($ignoreFirst) {
|
||||||
|
|
@ -1581,11 +1581,20 @@ $|=1;
|
||||||
next unless isIn($field->{name}, @import);
|
next unless isIn($field->{name}, @import);
|
||||||
$out->print("\tAdding field ".$field->{label}."\n",1);
|
$out->print("\tAdding field ".$field->{label}."\n",1);
|
||||||
my $type = $field->{type};
|
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({
|
my $value = $validate->$type({
|
||||||
name => $field->{name},
|
name => $field->{name},
|
||||||
defaultValue => $field->{defaultValue},
|
defaultValue => $field->{defaultValue},
|
||||||
options => $field->{options},
|
options => $field->{options},
|
||||||
},$row[$i]);
|
},$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}) {
|
if ($field->{isMeta}) {
|
||||||
$metadata->{$field->{label}} = $value;
|
$metadata->{$field->{label}} = $value;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue