1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 12:00:55 +01:00

Remove "Reviewed By" Differential field

Summary: Ref T11114. This is replaced by `DifferentialReviewedByCommitMessageField.php`.

Test Plan:
  - Used `differential.getcommitmessage` to query an accepted revision, saw "Reviewed By".
  - Grepped for removed class name.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11114

Differential Revision: https://secure.phabricator.com/D17079
This commit is contained in:
epriestley 2016-12-16 07:30:36 -08:00
parent 5e606504b7
commit 77601bf58c
3 changed files with 0 additions and 71 deletions

View file

@ -494,7 +494,6 @@ phutil_register_library_map(array(
'DifferentialRevertPlanCommitMessageField' => 'applications/differential/field/DifferentialRevertPlanCommitMessageField.php',
'DifferentialRevertPlanField' => 'applications/differential/customfield/DifferentialRevertPlanField.php',
'DifferentialReviewedByCommitMessageField' => 'applications/differential/field/DifferentialReviewedByCommitMessageField.php',
'DifferentialReviewedByField' => 'applications/differential/customfield/DifferentialReviewedByField.php',
'DifferentialReviewerDatasource' => 'applications/differential/typeahead/DifferentialReviewerDatasource.php',
'DifferentialReviewerForRevisionEdgeType' => 'applications/differential/edge/DifferentialReviewerForRevisionEdgeType.php',
'DifferentialReviewerProxy' => 'applications/differential/storage/DifferentialReviewerProxy.php',
@ -5146,7 +5145,6 @@ phutil_register_library_map(array(
'DifferentialRevertPlanCommitMessageField' => 'DifferentialCommitMessageCustomField',
'DifferentialRevertPlanField' => 'DifferentialStoredCustomField',
'DifferentialReviewedByCommitMessageField' => 'DifferentialCommitMessageField',
'DifferentialReviewedByField' => 'DifferentialCoreCustomField',
'DifferentialReviewerDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
'DifferentialReviewerForRevisionEdgeType' => 'PhabricatorEdgeType',
'DifferentialReviewerProxy' => 'Phobject',

View file

@ -30,7 +30,6 @@ final class PhabricatorDifferentialConfigOptions
new DifferentialTestPlanField(),
new DifferentialReviewersField(),
new DifferentialProjectReviewersField(),
new DifferentialReviewedByField(),
new DifferentialSubscribersField(),
new DifferentialRepositoryField(),
new DifferentialViewPolicyField(),

View file

@ -1,68 +0,0 @@
<?php
final class DifferentialReviewedByField
extends DifferentialCoreCustomField {
public function getFieldKey() {
return 'differential:reviewed-by';
}
public function getFieldKeyForConduit() {
return 'reviewedByPHIDs';
}
public function getFieldName() {
return pht('Reviewed By');
}
public function getFieldDescription() {
return pht('Records accepting reviewers in the durable message.');
}
public function shouldAppearInApplicationTransactions() {
return false;
}
public function canDisableField() {
return true;
}
protected function readValueFromRevision(
DifferentialRevision $revision) {
$phids = array();
foreach ($revision->getReviewerStatus() as $reviewer) {
switch ($reviewer->getStatus()) {
case DifferentialReviewerStatus::STATUS_ACCEPTED:
case DifferentialReviewerStatus::STATUS_ACCEPTED_OLDER:
$phids[] = $reviewer->getReviewerPHID();
break;
}
}
return $phids;
}
public function shouldAppearInCommitMessage() {
return true;
}
public function parseValueFromCommitMessage($value) {
return $this->parseObjectList(
$value,
array(
PhabricatorPeopleUserPHIDType::TYPECONST,
PhabricatorProjectProjectPHIDType::TYPECONST,
),
$allow_partial = true);
}
public function getRequiredHandlePHIDsForCommitMessage() {
return $this->getValue();
}
public function renderCommitMessageValue(array $handles) {
return $this->renderObjectList($handles);
}
}