From: lpsolit%gmail.com <> Date: Thu, 11 Jan 2007 03:21:12 +0000 (+0000) Subject: Bug 348281: importxml.pl dies if there is no target milestone or the target milestone... X-Git-Tag: bugzilla-2.22.2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20142906fb282908ff369b25b68d689dddb025a4;p=thirdparty%2Fbugzilla.git Bug 348281: importxml.pl dies if there is no target milestone or the target milestone is empty - Patch by Guzmán Brasó r=ghendricks a=myk --- diff --git a/importxml.pl b/importxml.pl index 82582f78d7..4a7b1f75e9 100755 --- a/importxml.pl +++ b/importxml.pl @@ -21,6 +21,7 @@ # Contributor(s): Dawn Endico # Gregary Hendricks # Vance Baarda +# Guzman Braso # This script reads in xml bug data from standard input and inserts # a new bug into bugzilla. Everything before the beginning id, - $bug_fields{'target_milestone'} ); + my $milestone; + if (defined $bug_fields{'target_milestone'} + && $bug_fields{'target_milestone'} ne "") { + + $milestone = + new Bugzilla::Milestone( $product->id, + $bug_fields{'target_milestone'} ); + } if ($milestone) { push( @values, $milestone->name ); }