Skip to content

Instantly share code, notes, and snippets.

@darkwing
Created August 18, 2017 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darkwing/dd4575fec84d468f6763616fccd6bc53 to your computer and use it in GitHub Desktop.
Save darkwing/dd4575fec84d468f6763616fccd6bc53 to your computer and use it in GitHub Desktop.
<?php
$field_list = PhabricatorCustomField::getObjectFields(
$revision,
PhabricatorCustomField::ROLE_DEFAULT
);
$fields = $field_list->getFields();
foreach($fields as $field_key => $value) {
if($field_key === 'differential:bugzilla-bug-id') {
echo 'FOUND !!!!'.$field_key.' ('.$value->getValue().')';
return $value->getValue(); // Outputs "null" despite the value being "1" on the revision detail page
}
else {
echo 'FAILED KEY CHECK: '.$field_key;
}
}
// No bug number found...how?!
return 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment