From 7bcced3ac97ae58cebad0e45b9f2fa1de9b20227 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Tue, 17 Jun 2014 19:01:39 +0000 Subject: Bug 1026421 - "No QA contact" represented by "" instead of null --- extensions/BzAPI/lib/Util.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'extensions/BzAPI/lib') 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); -- cgit v1.2.3-24-g4f1b