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,26 +791,36 @@ sub process_bug { ...@@ -791,26 +791,36 @@ sub process_bug {
|| undef; || undef;
push( @values, $date ); push( @values, $date );
push( @query, "deadline" ); push( @query, "deadline" );
eval { if ( defined $bug_fields{'estimated_time'} ) {
Bugzilla::Bug::ValidateTime($bug_fields{'estimated_time'}, "e"); eval {
}; Bugzilla::Bug::ValidateTime($bug_fields{'estimated_time'}, "e");
if (!$@){ };
push( @values, $bug_fields{'estimated_time'} ); if (!$@){
push( @query, "estimated_time" ); push( @values, $bug_fields{'estimated_time'} );
push( @query, "estimated_time" );
}
} }
eval { if ( defined $bug_fields{'remaining_time'} ) {
Bugzilla::Bug::ValidateTime($bug_fields{'remaining_time'}, "r"); eval {
}; Bugzilla::Bug::ValidateTime($bug_fields{'remaining_time'}, "r");
if (!$@){ };
push( @values, $bug_fields{'remaining_time'} ); if (!$@){
push( @query, "remaining_time" ); push( @values, $bug_fields{'remaining_time'} );
push( @query, "remaining_time" );
}
} }
eval { if ( defined $bug_fields{'actual_time'} ) {
Bugzilla::Bug::ValidateTime($bug_fields{'actual_time'}, "a"); eval {
}; Bugzilla::Bug::ValidateTime($bug_fields{'actual_time'}, "a");
if ($@){ };
if ($@){
$bug_fields{'actual_time'} = 0.0;
$err .= "Invalid Actual Time. Setting to 0.0\n";
}
}
else {
$bug_fields{'actual_time'} = 0.0; $bug_fields{'actual_time'} = 0.0;
$err .= "Invalid Actual Time. Setting to 0.0\n"; $err .= "Actual time not defined. Setting to 0.0\n";
} }
} }
......
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