diff --git a/src/applications/transactions/editfield/PhabricatorSelectEditField.php b/src/applications/transactions/editfield/PhabricatorSelectEditField.php index b72cafc5d1..fa565dbe61 100644 --- a/src/applications/transactions/editfield/PhabricatorSelectEditField.php +++ b/src/applications/transactions/editfield/PhabricatorSelectEditField.php @@ -27,18 +27,13 @@ final class PhabricatorSelectEditField return $this->optionAliases; } + protected function getDefaultValueFromConfiguration($value) { + return $this->getCanonicalValue($value); + } + protected function getValueForControl() { $value = parent::getValueForControl(); - - $options = $this->getOptions(); - if (!isset($options[$value])) { - $aliases = $this->getOptionAliases(); - if (isset($aliases[$value])) { - $value = $aliases[$value]; - } - } - - return $value; + return $this->getCanonicalValue($value); } protected function newControl() { @@ -59,4 +54,16 @@ final class PhabricatorSelectEditField return new ConduitStringParameterType(); } + private function getCanonicalValue($value) { + $options = $this->getOptions(); + if (!isset($options[$value])) { + $aliases = $this->getOptionAliases(); + if (isset($aliases[$value])) { + $value = $aliases[$value]; + } + } + + return $value; + } + }