diff options
author | David Lawrence <dkl@redhat.com> | 2014-06-17 21:36:07 +0200 |
---|---|---|
committer | David Lawrence <dkl@redhat.com> | 2014-06-17 21:36:07 +0200 |
commit | c2fef4494755f341a1d17fc61f208b3cb650da1d (patch) | |
tree | fd309d5c792c9e74cfa403cf668141f236bcf6c6 /extensions | |
parent | 7bcced3ac97ae58cebad0e45b9f2fa1de9b20227 (diff) | |
download | bugzilla-c2fef4494755f341a1d17fc61f208b3cb650da1d.tar.gz bugzilla-c2fef4494755f341a1d17fc61f208b3cb650da1d.tar.xz |
Bug 1026415 - Some empty fields are present as "" rather than being absent
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/BzAPI/lib/Util.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/extensions/BzAPI/lib/Util.pm b/extensions/BzAPI/lib/Util.pm index 9858c17a1..e25e75b55 100644 --- a/extensions/BzAPI/lib/Util.pm +++ b/extensions/BzAPI/lib/Util.pm @@ -190,6 +190,7 @@ sub fix_bug { next; } + next if $method eq 'Bug.search' && $key eq 'url'; # Return url even if empty 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); @@ -232,7 +233,7 @@ sub fix_user { $data = { name => filter_email($object->login) }; - if ($user->id) { + if ($user->id && $object->name) { $data->{real_name} = $rpc->type('string', $object->name); } } @@ -244,6 +245,8 @@ sub fix_user { $data->{ref} = $rpc->type('string', ref_urlbase . "/user/" . $object->login); } + delete $data->{real_name} if !$data->{real_name}; + return $data; } |