mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Fix int fields for now
Summary: Fix T15516 Test Plan: Viewed an "int" custom field, no boom. Reviewers: speck, valerio.bozzolan, O1 Blessed Committers Reviewed By: valerio.bozzolan, O1 Blessed Committers Subscribers: tobiaswiese, Matthew, Cigaryno Maniphest Tasks: T15516 Differential Revision: https://we.phorge.it/D25325
This commit is contained in:
parent
d725ffaa77
commit
603cf474ee
1 changed files with 7 additions and 3 deletions
|
@ -301,10 +301,14 @@ abstract class PhabricatorStandardCustomField
|
||||||
}
|
}
|
||||||
|
|
||||||
public function renderPropertyViewValue(array $handles) {
|
public function renderPropertyViewValue(array $handles) {
|
||||||
if (!phutil_nonempty_string($this->getFieldValue())) {
|
// If your field needs to render anything more complicated then a string,
|
||||||
return null;
|
// then you should override this method.
|
||||||
|
$value_str = phutil_string_cast($this->getFieldValue());
|
||||||
|
|
||||||
|
if (phutil_nonempty_string($value_str)) {
|
||||||
|
return $value_str;
|
||||||
}
|
}
|
||||||
return $this->getFieldValue();
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function shouldAppearInApplicationSearch() {
|
public function shouldAppearInApplicationSearch() {
|
||||||
|
|
Loading…
Reference in a new issue