diff options
author | lpsolit%gmail.com <> | 2007-01-11 03:19:00 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2007-01-11 03:19:00 +0000 |
commit | ac7671d0b1fad018fa7a7b4ea5de2c062390a9dc (patch) | |
tree | b5179ab41d0b9db1eee9be3a8a5ede4687d260ee | |
parent | ed9a4ec6581390899aa1591c6a98a1b1af61a24b (diff) | |
download | bugs-ac7671d0b1fad018fa7a7b4ea5de2c062390a9dc.tar bugs-ac7671d0b1fad018fa7a7b4ea5de2c062390a9dc.tar.gz bugs-ac7671d0b1fad018fa7a7b4ea5de2c062390a9dc.tar.bz2 bugs-ac7671d0b1fad018fa7a7b4ea5de2c062390a9dc.tar.xz bugs-ac7671d0b1fad018fa7a7b4ea5de2c062390a9dc.zip |
Bug 348281: importxml.pl dies if there is no target milestone or the target milestone is empty - Patch by Guzmán Brasó <gbn@hqso.net> r/a=LpSolit
-rwxr-xr-x | importxml.pl | 10 |
1 files 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 <endico@mozilla.org> # Gregary Hendricks <ghendricks@novell.com> # Vance Baarda <vrb@novell.com> +# Guzman Braso <gbn@hqso.net> # This script reads in xml bug data from standard input and inserts # a new bug into bugzilla. Everything before the beginning <?xml line @@ -692,8 +693,13 @@ sub process_bug { # Milestone if ( $params->{"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 ); } |