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

Remove "DifferentialProjectsField" custom field

Summary: Ref T11114. This is entirely obsoleted by EditEngine.

Test Plan: Edited projects on a revision.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11114

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

-113
-2
src/__phutil_library_map__.php
··· 478 478 'DifferentialParseRenderTestCase' => 'applications/differential/__tests__/DifferentialParseRenderTestCase.php', 479 479 'DifferentialPathField' => 'applications/differential/customfield/DifferentialPathField.php', 480 480 'DifferentialProjectReviewersField' => 'applications/differential/customfield/DifferentialProjectReviewersField.php', 481 - 'DifferentialProjectsField' => 'applications/differential/customfield/DifferentialProjectsField.php', 482 481 'DifferentialQueryConduitAPIMethod' => 'applications/differential/conduit/DifferentialQueryConduitAPIMethod.php', 483 482 'DifferentialQueryDiffsConduitAPIMethod' => 'applications/differential/conduit/DifferentialQueryDiffsConduitAPIMethod.php', 484 483 'DifferentialRawDiffRenderer' => 'applications/differential/render/DifferentialRawDiffRenderer.php', ··· 5131 5130 'DifferentialParseRenderTestCase' => 'PhabricatorTestCase', 5132 5131 'DifferentialPathField' => 'DifferentialCustomField', 5133 5132 'DifferentialProjectReviewersField' => 'DifferentialCustomField', 5134 - 'DifferentialProjectsField' => 'DifferentialCoreCustomField', 5135 5133 'DifferentialQueryConduitAPIMethod' => 'DifferentialConduitAPIMethod', 5136 5134 'DifferentialQueryDiffsConduitAPIMethod' => 'DifferentialConduitAPIMethod', 5137 5135 'DifferentialRawDiffRenderer' => 'Phobject',
-1
src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
··· 33 33 new DifferentialReviewedByField(), 34 34 new DifferentialSubscribersField(), 35 35 new DifferentialRepositoryField(), 36 - new DifferentialProjectsField(), 37 36 new DifferentialViewPolicyField(), 38 37 39 38 new DifferentialManiphestTasksField(),
-110
src/applications/differential/customfield/DifferentialProjectsField.php
··· 1 - <?php 2 - 3 - final class DifferentialProjectsField 4 - extends DifferentialCoreCustomField { 5 - 6 - public function getFieldKey() { 7 - return 'phabricator:projects'; 8 - } 9 - 10 - public function getFieldName() { 11 - return pht('Tags'); 12 - } 13 - 14 - public function getFieldDescription() { 15 - return pht('Tag projects.'); 16 - } 17 - 18 - public function shouldAppearInPropertyView() { 19 - return false; 20 - } 21 - 22 - public function shouldAppearInApplicationTransactions() { 23 - return true; 24 - } 25 - 26 - protected function readValueFromRevision( 27 - DifferentialRevision $revision) { 28 - if (!$revision->getPHID()) { 29 - return array(); 30 - } 31 - 32 - $projects = PhabricatorEdgeQuery::loadDestinationPHIDs( 33 - $revision->getPHID(), 34 - PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); 35 - $projects = array_reverse($projects); 36 - 37 - return $projects; 38 - } 39 - 40 - public function getNewValueForApplicationTransactions() { 41 - return array('=' => array_fuse($this->getValue())); 42 - } 43 - 44 - public function readValueFromRequest(AphrontRequest $request) { 45 - $this->setValue($request->getArr($this->getFieldKey())); 46 - } 47 - 48 - public function renderEditControl(array $handles) { 49 - return id(new AphrontFormTokenizerControl()) 50 - ->setUser($this->getViewer()) 51 - ->setName($this->getFieldKey()) 52 - ->setDatasource(new PhabricatorProjectDatasource()) 53 - ->setValue($this->getValue()) 54 - ->setLabel($this->getFieldName()); 55 - } 56 - 57 - public function getApplicationTransactionType() { 58 - return PhabricatorTransactions::TYPE_EDGE; 59 - } 60 - 61 - public function shouldAppearInCommitMessage() { 62 - return true; 63 - } 64 - 65 - public function shouldAllowEditInCommitMessage() { 66 - return true; 67 - } 68 - 69 - public function shouldOverwriteWhenCommitMessageIsEdited() { 70 - return true; 71 - } 72 - 73 - public function getCommitMessageLabels() { 74 - return array( 75 - 'Tags', 76 - 'Project', 77 - 'Projects', 78 - ); 79 - } 80 - 81 - public function getRequiredHandlePHIDsForCommitMessage() { 82 - return $this->getValue(); 83 - } 84 - 85 - public function renderCommitMessageValue(array $handles) { 86 - return $this->renderObjectList($handles); 87 - } 88 - 89 - public function shouldAppearInConduitDictionary() { 90 - // To improve performance, we exclude this field from Conduit results. 91 - // See T11404 for discussion. In modern "differential.revision.search", 92 - // this information is available efficiently as an attachment. 93 - return false; 94 - } 95 - 96 - public function getApplicationTransactionMetadata() { 97 - return array( 98 - 'edge:type' => PhabricatorProjectObjectHasProjectEdgeType::EDGECONST, 99 - ); 100 - } 101 - 102 - public function parseValueFromCommitMessage($value) { 103 - return $this->parseObjectList( 104 - $value, 105 - array( 106 - PhabricatorProjectProjectPHIDType::TYPECONST, 107 - )); 108 - } 109 - 110 - }