diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2011-10-08 00:35:42 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2011-10-08 00:35:42 +0200 |
commit | 7959e23b02affe5927090c3d1f08b18c37b40682 (patch) | |
tree | 641cf72e06622985998fde0db3dbb1f7e8a99331 | |
parent | 763a930131864bedd3155b668fcd8fd0fce2fefc (diff) | |
download | bugzilla-7959e23b02affe5927090c3d1f08b18c37b40682.tar.gz bugzilla-7959e23b02affe5927090c3d1f08b18c37b40682.tar.xz |
Bug 691845: importxml.pl complains if an open bug has the resolution field set to ''
r=dkl a=LpSolit
-rwxr-xr-x | importxml.pl | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/importxml.pl b/importxml.pl index c2366cb6c..896848b0a 100755 --- a/importxml.pl +++ b/importxml.pl @@ -854,8 +854,6 @@ sub process_bug { } # Status & Resolution - my $has_res = defined($bug_fields{'resolution'}); - my $has_status = defined($bug_fields{'bug_status'}); my $valid_res = check_field('resolution', scalar $bug_fields{'resolution'}, undef, ERR_LEVEL ); @@ -910,10 +908,10 @@ sub process_bug { } } - if($has_status){ + if ($status) { if($valid_status){ if($is_open){ - if($has_res){ + if ($resolution) { $err .= "Resolution set on an open status.\n"; $err .= " Dropping resolution $resolution\n"; $resolution = undef; @@ -947,7 +945,7 @@ sub process_bug { } } else{ # $is_open is false - if(!$has_res){ + if (!$resolution) { $err .= "Missing Resolution. Setting status to "; if($everconfirmed){ $status = $initial_status; @@ -977,9 +975,8 @@ sub process_bug { $err .= $bug_fields{'bug_status'} . "\".\n"; $resolution = undef; } - } - else{ #has_status is false + else { if($everconfirmed){ $status = $initial_status; } @@ -990,8 +987,8 @@ sub process_bug { $err .= " Previous status was unknown\n"; $resolution = undef; } - - if (defined $resolution){ + + if ($resolution) { push( @query, "resolution" ); push( @values, $resolution ); } |