diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 0a0d631612..f8088dcb28 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -2007,7 +2007,6 @@ phutil_register_library_map(array( 'ReleephRequestViewController' => 'applications/releeph/controller/request/ReleephRequestViewController.php', 'ReleephRequestorFieldSpecification' => 'applications/releeph/field/specification/ReleephRequestorFieldSpecification.php', 'ReleephRevisionFieldSpecification' => 'applications/releeph/field/specification/ReleephRevisionFieldSpecification.php', - 'ReleephRiskFieldSpecification' => 'applications/releeph/field/specification/ReleephRiskFieldSpecification.php', 'ReleephSeverityFieldSpecification' => 'applications/releeph/field/specification/ReleephSeverityFieldSpecification.php', 'ReleephStatusFieldSpecification' => 'applications/releeph/field/specification/ReleephStatusFieldSpecification.php', 'ReleephSummaryFieldSpecification' => 'applications/releeph/field/specification/ReleephSummaryFieldSpecification.php', @@ -4201,7 +4200,6 @@ phutil_register_library_map(array( 'ReleephRequestViewController' => 'ReleephProjectController', 'ReleephRequestorFieldSpecification' => 'ReleephFieldSpecification', 'ReleephRevisionFieldSpecification' => 'ReleephFieldSpecification', - 'ReleephRiskFieldSpecification' => 'ReleephFieldSpecification', 'ReleephSeverityFieldSpecification' => 'ReleephLevelFieldSpecification', 'ReleephStatusFieldSpecification' => 'ReleephFieldSpecification', 'ReleephSummaryFieldSpecification' => 'ReleephFieldSpecification', diff --git a/src/applications/releeph/field/specification/ReleephRiskFieldSpecification.php b/src/applications/releeph/field/specification/ReleephRiskFieldSpecification.php deleted file mode 100644 index 297390202a..0000000000 --- a/src/applications/releeph/field/specification/ReleephRiskFieldSpecification.php +++ /dev/null @@ -1,67 +0,0 @@ - 'Completely safe to pick this request.', - 'SOME' => 'There is some risk this could break things, but not much.', - 'HIGH' => 'This is pretty risky, but is also very important.', - ); - - public function getFieldKey() { - return 'risk'; - } - - public function getName() { - return 'Riskiness'; - } - - public function getStorageKey() { - return 'risk'; - } - - public function renderLabelForHeaderView() { - return 'Riskiness'; - } - - private $error = true; - - public function renderReleephEditControl(AphrontRequest $request) { - $value = $request->getStr('risk', $this->getValue()); - $buttons = id(new AphrontFormRadioButtonControl()) - ->setLabel('Riskiness') - ->setName('risk') - ->setError($this->error) - ->setValue($value); - foreach (self::$defaultRisks as $value => $description) { - $buttons->addButton($value, $value, $description); - } - return $buttons; - } - - public function validate($risk) { - if (!$risk) { - $this->error = 'Required'; - throw new ReleephFieldParseException( - $this, - "No risk was given, which probably means we've changed the set ". - "of valid risks since you made this request. Please pick one."); - } - if (!idx(self::$defaultRisks, $risk)) { - throw new ReleephFieldParseException( - $this, - "Unknown risk '{$risk}'."); - } - } - - public function renderHelpForArcanist() { - $help = ''; - foreach (self::$defaultRisks as $name => $description) { - $help .= " **{$name}**\n"; - $help .= phutil_console_wrap($description."\n", 8); - } - return $help; - } - -}