Commit 121badd2 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 348282: importxml.pl throws Bugzilla::Bug::ValidateTime warnings if the time…

Bug 348282: importxml.pl throws Bugzilla::Bug::ValidateTime warnings if the time value is not defined and param timetrackinggroup defined - Patch by Guzmán Brasó <gbn@hqso.net> r/a=LpSolit
parent ef1b5931
......@@ -791,6 +791,7 @@ sub process_bug {
|| undef;
push( @values, $date );
push( @query, "deadline" );
if ( defined $bug_fields{'estimated_time'} ) {
eval {
Bugzilla::Bug::ValidateTime($bug_fields{'estimated_time'}, "e");
};
......@@ -798,6 +799,8 @@ sub process_bug {
push( @values, $bug_fields{'estimated_time'} );
push( @query, "estimated_time" );
}
}
if ( defined $bug_fields{'remaining_time'} ) {
eval {
Bugzilla::Bug::ValidateTime($bug_fields{'remaining_time'}, "r");
};
......@@ -805,6 +808,8 @@ sub process_bug {
push( @values, $bug_fields{'remaining_time'} );
push( @query, "remaining_time" );
}
}
if ( defined $bug_fields{'actual_time'} ) {
eval {
Bugzilla::Bug::ValidateTime($bug_fields{'actual_time'}, "a");
};
......@@ -813,6 +818,11 @@ sub process_bug {
$err .= "Invalid Actual Time. Setting to 0.0\n";
}
}
else {
$bug_fields{'actual_time'} = 0.0;
$err .= "Actual time not defined. Setting to 0.0\n";
}
}
# Reporter Assignee QA Contact
my $exporterid = $exporter->id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment