aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-01-11 03:19:00 +0000
committerlpsolit%gmail.com <>2007-01-11 03:19:00 +0000
commitac7671d0b1fad018fa7a7b4ea5de2c062390a9dc (patch)
treeb5179ab41d0b9db1eee9be3a8a5ede4687d260ee /importxml.pl
parentBug 366593: everconfirmed is no longer passed to XML bug files - Patch by FrÃ... (diff)
downloadbugzilla-ac7671d0b1fad018fa7a7b4ea5de2c062390a9dc.tar.gz
bugzilla-ac7671d0b1fad018fa7a7b4ea5de2c062390a9dc.tar.bz2
bugzilla-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
Diffstat (limited to 'importxml.pl')
-rwxr-xr-ximportxml.pl10
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 );
}