@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make standard fields more liberal about interpreting empty strings

Summary:
Fixes T3867. We currently show more empty custom field values on task detail pages than we should, for at least two reasons:

- `<select />` fields with an empty string option store `""`, but users reasonably expect this to mean "no value".
- Old fields may have stored empty strings, and migrated forward.

This fix generally aligns behavior with user expectations. We could get more extreme about not storing `""` in the database, but I think this is generally a less surpsing fix.

Test Plan: Made a select with a `"" : "None"` option, selected it, saw it vanish from task detail screen.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3867

Differential Revision: https://secure.phabricator.com/D7105

+6
+3
src/infrastructure/customfield/standard/PhabricatorStandardCustomField.php
··· 218 218 } 219 219 220 220 public function renderPropertyViewValue() { 221 + if (!strlen($this->getFieldValue())) { 222 + return null; 223 + } 221 224 return $this->getFieldValue(); 222 225 } 223 226
+3
src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldSelect.php
··· 74 74 } 75 75 76 76 public function renderPropertyViewValue() { 77 + if (!strlen($this->getFieldValue())) { 78 + return null; 79 + } 77 80 return idx($this->getOptions(), $this->getFieldValue()); 78 81 } 79 82