Commit ac7671d0 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 348281: importxml.pl dies if there is no target milestone or the target…

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
parent ed9a4ec6
......@@ -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 );
}
......
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