From: dklawren Date: Thu, 11 Jan 2018 14:55:24 +0000 (-0500) Subject: Bug 1429600 - Update Revision.pm type checking to treat bug id as a simple string... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7861c1d1d4a1b32619c0e36f985ecc4ff8c7ab8b;p=thirdparty%2Fbugzilla.git Bug 1429600 - Update Revision.pm type checking to treat bug id as a simple string or undefined --- diff --git a/extensions/PhabBugz/lib/Revision.pm b/extensions/PhabBugz/lib/Revision.pm index 59312b39d..1c91e3d85 100644 --- a/extensions/PhabBugz/lib/Revision.pm +++ b/extensions/PhabBugz/lib/Revision.pm @@ -36,7 +36,7 @@ my $SearchResult = Dict[ repositoryPHID => Maybe[Str], status => HashRef, summary => Str, - "bugzilla.bug-id" => Str + "bugzilla.bug-id" => Maybe[Str] ], attachments => Dict[ reviewers => Dict[ @@ -93,7 +93,10 @@ sub _load { # Some values in Phabricator for bug ids may have been saved # white whitespace so we remove any here just in case. - $result->{fields}->{'bugzilla.bug-id'} = trim($result->{fields}->{'bugzilla.bug-id'}); + $result->{fields}->{'bugzilla.bug-id'} + = $result->{fields}->{'bugzilla.bug-id'} + ? trim($result->{fields}->{'bugzilla.bug-id'}) + : ""; return $result; }