From c57c39f5d2e17adf2dd47dc0fab276e623b3a495 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 16 Dec 2016 07:17:05 -0800 Subject: [PATCH] Remove "Next Step" Differential custom field Summary: Ref T12027. This is purely a UI hint for new users that I'd like to integrate into "Land Revision" in the future instead. Test Plan: Grepped for removed class, browsed Differential. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12027 Differential Revision: https://secure.phabricator.com/D17076 --- src/__phutil_library_map__.php | 2 - .../PhabricatorDifferentialConfigOptions.php | 2 - .../customfield/DifferentialNextStepField.php | 65 ------------------- 3 files changed, 69 deletions(-) delete mode 100644 src/applications/differential/customfield/DifferentialNextStepField.php diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 41826e0343..bda6b89d07 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -473,7 +473,6 @@ phutil_register_library_map(array( 'DifferentialMailView' => 'applications/differential/mail/DifferentialMailView.php', 'DifferentialManiphestTasksField' => 'applications/differential/customfield/DifferentialManiphestTasksField.php', 'DifferentialModernHunk' => 'applications/differential/storage/DifferentialModernHunk.php', - 'DifferentialNextStepField' => 'applications/differential/customfield/DifferentialNextStepField.php', 'DifferentialParentRevisionsField' => 'applications/differential/customfield/DifferentialParentRevisionsField.php', 'DifferentialParseCacheGarbageCollector' => 'applications/differential/garbagecollector/DifferentialParseCacheGarbageCollector.php', 'DifferentialParseCommitMessageConduitAPIMethod' => 'applications/differential/conduit/DifferentialParseCommitMessageConduitAPIMethod.php', @@ -5128,7 +5127,6 @@ phutil_register_library_map(array( 'DifferentialMailView' => 'Phobject', 'DifferentialManiphestTasksField' => 'DifferentialCoreCustomField', 'DifferentialModernHunk' => 'DifferentialHunk', - 'DifferentialNextStepField' => 'DifferentialCustomField', 'DifferentialParentRevisionsField' => 'DifferentialCustomField', 'DifferentialParseCacheGarbageCollector' => 'PhabricatorGarbageCollector', 'DifferentialParseCommitMessageConduitAPIMethod' => 'DifferentialConduitAPIMethod', diff --git a/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php b/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php index d09807e586..2d21fd6fe7 100644 --- a/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php +++ b/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php @@ -25,8 +25,6 @@ final class PhabricatorDifferentialConfigOptions $custom_field_type = 'custom:PhabricatorCustomFieldConfigOptionType'; $fields = array( - new DifferentialNextStepField(), - new DifferentialTitleField(), new DifferentialSummaryField(), new DifferentialTestPlanField(), diff --git a/src/applications/differential/customfield/DifferentialNextStepField.php b/src/applications/differential/customfield/DifferentialNextStepField.php deleted file mode 100644 index bf0ed5972d..0000000000 --- a/src/applications/differential/customfield/DifferentialNextStepField.php +++ /dev/null @@ -1,65 +0,0 @@ -getFieldName(); - } - - public function renderPropertyViewValue(array $handles) { - $revision = $this->getObject(); - $diff = $revision->getActiveDiff(); - - $status = $revision->getStatus(); - if ($status != ArcanistDifferentialRevisionStatus::ACCEPTED) { - return null; - } - - $local_vcs = $diff->getSourceControlSystem(); - switch ($local_vcs) { - case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL: - $bookmark = $diff->getBookmark(); - if (strlen($bookmark)) { - $next_step = csprintf('arc land %R', $bookmark); - } else { - $next_step = csprintf('arc land'); - } - break; - case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: - $branch = $diff->getBranch(); - if (strlen($branch)) { - $next_step = csprintf('arc land %R', $branch); - } else { - $next_step = csprintf('arc land'); - } - break; - case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: - $next_step = csprintf('arc commit'); - break; - default: - return null; - } - - $next_step = phutil_tag('tt', array(), (string)$next_step); - - return $next_step; - } - -}