summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-01-11 04:19:00 +0100
committerlpsolit%gmail.com <>2007-01-11 04:19:00 +0100
commitac7671d0b1fad018fa7a7b4ea5de2c062390a9dc (patch)
treeb5179ab41d0b9db1eee9be3a8a5ede4687d260ee
parented9a4ec6581390899aa1591c6a98a1b1af61a24b (diff)
downloadbugzilla-ac7671d0b1fad018fa7a7b4ea5de2c062390a9dc.tar.gz
bugzilla-ac7671d0b1fad018fa7a7b4ea5de2c062390a9dc.tar.xz
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-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 );
}