summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/BzAPI/lib/Util.pm5
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;
}