summaryrefslogtreecommitdiffstats
path: root/extensions/BzAPI/lib
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@redhat.com>2014-06-17 21:01:39 +0200
committerDavid Lawrence <dkl@redhat.com>2014-06-17 21:01:39 +0200
commit7bcced3ac97ae58cebad0e45b9f2fa1de9b20227 (patch)
treec8feb0d088daaf1d409e023e90a1a9e47ec23a75 /extensions/BzAPI/lib
parentd2c984a396b5ec99838f47bcd8452ad0d3778e35 (diff)
downloadbugzilla-7bcced3ac97ae58cebad0e45b9f2fa1de9b20227.tar.gz
bugzilla-7bcced3ac97ae58cebad0e45b9f2fa1de9b20227.tar.xz
Bug 1026421 - "No QA contact" represented by "" instead of null
Diffstat (limited to 'extensions/BzAPI/lib')
-rw-r--r--extensions/BzAPI/lib/Util.pm11
1 files changed, 9 insertions, 2 deletions
diff --git a/extensions/BzAPI/lib/Util.pm b/extensions/BzAPI/lib/Util.pm
index ba16f0a13..9858c17a1 100644
--- a/extensions/BzAPI/lib/Util.pm
+++ b/extensions/BzAPI/lib/Util.pm
@@ -180,9 +180,16 @@ sub fix_bug {
}
}
+ # Remove empty values in some cases
foreach my $key (keys %$data) {
- # Remove empty values in some cases
- next if $key eq 'qa_contact'; # Return qa_contact even if null
+ # QA Contact is null if single bug or "" if doing search
+ if ($key eq 'qa_contact' && !$data->{$key}->{name}) {
+ if ($method eq 'Bug.search') {
+ $data->{$key}->{name} = $rpc->type('string', '');
+ }
+ next;
+ }
+
next if $method eq 'Bug.search' && $key eq 'keywords'; # Return keywords even if empty
next if $method eq 'Bug.get' && grep($_ eq $key, TIMETRACKING_FIELDS);