Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2865692
D25696.1736610111.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25696.1736610111.diff
View Options
diff --git a/src/applications/phid/PhabricatorObjectHandle.php b/src/applications/phid/PhabricatorObjectHandle.php
--- a/src/applications/phid/PhabricatorObjectHandle.php
+++ b/src/applications/phid/PhabricatorObjectHandle.php
@@ -168,6 +168,19 @@
if ($this->name === null) {
if ($this->getPolicyFiltered()) {
return pht('Restricted %s', $this->getTypeName());
+ } else if ($this->getPHID() && $this->getTypeName() ===
+ PhabricatorPHIDConstants::PHID_TYPE_UNKNOWN) {
+ // Values of custom Select field conditions in Herald rules do not have
+ // a PHID (and no PHID type) as they are arbitrary text when loadPage()
+ // in PhabricatorHandleQuery calls $type = phid_get_type($phid).
+ // Thus the code lower in this class cannot pull a name to render for
+ // these non-existing PHIDs either.
+ // In this case, render their PHID (the actual Select field key value).
+ // This is always more informative than 'Unknown Object (????)' though
+ // still imperfect as it displays the key instead of the user-friendly
+ // name value defined in maniphest.custom-field-definitions.
+ // https://we.phorge.it/T15860
+ return $this->getPHID();
} else {
return pht('Unknown Object (%s)', $this->getTypeName());
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 11, 15:41 (6 d, 7 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1110517
Default Alt Text
D25696.1736610111.diff (1 KB)
Attached To
Mode
D25696: Avoid "Unknown Object (????)" for custom Select field values in Herald editor
Attached
Detach File
Event Timeline
Log In to Comment