summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordklawren <dklawren@users.noreply.github.com>2018-01-11 15:55:24 +0100
committerDylan William Hardison <dylan@hardison.net>2018-01-11 15:55:24 +0100
commit7861c1d1d4a1b32619c0e36f985ecc4ff8c7ab8b (patch)
tree8e19faaabc0ee4f029527e84ff2f9f3eb74f3555
parent00842117b87d59d1b9cee99d2bc633e81c87456e (diff)
downloadbugzilla-7861c1d1d4a1b32619c0e36f985ecc4ff8c7ab8b.tar.gz
bugzilla-7861c1d1d4a1b32619c0e36f985ecc4ff8c7ab8b.tar.xz
Bug 1429600 - Update Revision.pm type checking to treat bug id as a simple string or undefined
-rw-r--r--extensions/PhabBugz/lib/Revision.pm7
1 files changed, 5 insertions, 2 deletions
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;
}