From: lpsolit%gmail.com <> Date: Thu, 11 Jan 2007 03:19:00 +0000 (+0000) Subject: Bug 348281: importxml.pl dies if there is no target milestone or the target milestone... X-Git-Tag: bugzilla-2.23.4~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac7671d0b1fad018fa7a7b4ea5de2c062390a9dc;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/a=LpSolit --- diff --git a/importxml.pl b/importxml.pl index 8f93ab46cf..bd10e65403 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 {"usetargetmilestone"} ) { - my $milestone = new Bugzilla::Milestone( - { product => $product, name => $bug_fields{'target_milestone'} }); + my $milestone; + if (defined $bug_fields{'target_milestone'} + && $bug_fields{'target_milestone'} ne "") { + + $milestone = new Bugzilla::Milestone( + { product => $product, name => $bug_fields{'target_milestone'} }); + } if ($milestone) { push( @values, $milestone->name ); }