diff options
author | David Lawrence <dkl@redhat.com> | 2014-06-17 21:01:39 +0200 |
---|---|---|
committer | David Lawrence <dkl@redhat.com> | 2014-06-17 21:01:39 +0200 |
commit | 7bcced3ac97ae58cebad0e45b9f2fa1de9b20227 (patch) | |
tree | c8feb0d088daaf1d409e023e90a1a9e47ec23a75 /extensions/BzAPI | |
parent | d2c984a396b5ec99838f47bcd8452ad0d3778e35 (diff) | |
download | bugzilla-7bcced3ac97ae58cebad0e45b9f2fa1de9b20227.tar.gz bugzilla-7bcced3ac97ae58cebad0e45b9f2fa1de9b20227.tar.xz |
Bug 1026421 - "No QA contact" represented by "" instead of null
Diffstat (limited to 'extensions/BzAPI')
-rw-r--r-- | extensions/BzAPI/lib/Util.pm | 11 |
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); |