From ac7671d0b1fad018fa7a7b4ea5de2c062390a9dc Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 11 Jan 2007 03:19:00 +0000 Subject: 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- importxml.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/importxml.pl b/importxml.pl index 8f93ab46c..bd10e6540 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 ); } -- cgit v1.2.3-24-g4f1b