@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.

Allow standard fields to have defaults

Summary: Final standard capability from Maniphest fields.

Test Plan: This isn't really reachable now since users always exist, but faked it and verified the field prefilled as expected.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

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

+7 -1
+4 -1
src/infrastructure/customfield/field/PhabricatorCustomFieldList.php
··· 27 27 return $this; 28 28 } 29 29 30 + 30 31 /** 31 32 * Read stored values for all fields which support storage. 32 33 * ··· 65 66 $storage = idx($objects, $key); 66 67 if ($storage) { 67 68 $field->setValueFromStorage($storage->getFieldValue()); 68 - } else { 69 + } else if ($object->getPHID()) { 70 + // NOTE: We set this only if the object exists. Otherwise, we allow the 71 + // field to retain any default value it may have. 69 72 $field->setValueFromStorage(null); 70 73 } 71 74 }
+3
src/infrastructure/customfield/standard/PhabricatorStandardCustomField.php
··· 108 108 $this->setRequired($value); 109 109 $this->setFieldError(true); 110 110 break; 111 + case 'default': 112 + $this->setFieldValue($value); 113 + break; 111 114 case 'type': 112 115 // We set this earlier on. 113 116 break;