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

Make stored custom fields work with v3 EditEngine API

Summary: Ref T11114. This makes the unusual stored custom fields ("Blame Rev", "Revert Plan", etc) work somewhat correctly (?) with EditEngine.

Test Plan:
- Created, updated and edited revisions with unusual stored custom fields like "Blame Rev".
- Observed that these fields now populate in "differential.revision.edit" when available.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11114

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

+49 -4
+8
src/applications/differential/customfield/DifferentialAuditorsField.php
··· 57 57 return $this->renderObjectList($handles); 58 58 } 59 59 60 + public function shouldAppearInConduitTransactions() { 61 + return true; 62 + } 63 + 64 + protected function newConduitEditParameterType() { 65 + return new ConduitPHIDListParameterType(); 66 + } 67 + 60 68 }
+8
src/applications/differential/customfield/DifferentialBlameRevisionField.php
··· 114 114 return true; 115 115 } 116 116 117 + public function shouldAppearInConduitTransactions() { 118 + return true; 119 + } 120 + 121 + protected function newConduitEditParameterType() { 122 + return new ConduitStringParameterType(); 123 + } 124 + 117 125 }
+5
src/applications/differential/customfield/DifferentialCustomField.php
··· 20 20 return $this->getFieldKey(); 21 21 } 22 22 23 + // TODO: As above. 24 + public function getModernFieldKey() { 25 + return $this->getFieldKeyForConduit(); 26 + } 27 + 23 28 public function shouldEnableForRole($role) { 24 29 switch ($role) { 25 30 case self::ROLE_COMMITMESSAGE:
+7 -2
src/applications/differential/customfield/DifferentialJIRAIssuesField.php
··· 295 295 return $this; 296 296 } 297 297 298 - 299 - 300 298 public function renderCommitMessageValue(array $handles) { 301 299 $value = $this->getValue(); 302 300 if (!$value) { ··· 309 307 return true; 310 308 } 311 309 310 + public function shouldAppearInConduitTransactions() { 311 + return true; 312 + } 313 + 314 + protected function newConduitEditParameterType() { 315 + return new ConduitStringListParameterType(); 316 + } 312 317 313 318 }
+8
src/applications/differential/customfield/DifferentialRevertPlanField.php
··· 142 142 return true; 143 143 } 144 144 145 + public function shouldAppearInConduitTransactions() { 146 + return true; 147 + } 148 + 149 + protected function newConduitEditParameterType() { 150 + return new ConduitStringParameterType(); 151 + } 152 + 145 153 }
+6 -2
src/applications/differential/field/DifferentialCommitMessageCustomField.php
··· 61 61 } 62 62 63 63 public function getFieldTransactions($value) { 64 - // TODO: Implement this! 65 - return array(); 64 + return array( 65 + array( 66 + 'type' => $this->getCommitMessageFieldKey(), 67 + 'value' => $value, 68 + ), 69 + ); 66 70 } 67 71 68 72 }
+7
src/applications/transactions/edittype/PhabricatorEditType.php
··· 107 107 108 108 public function getConduitType() { 109 109 $parameter_type = $this->getConduitParameterType(); 110 + if (!$parameter_type) { 111 + throw new Exception( 112 + pht( 113 + 'Edit type (with key "%s") is missing a Conduit parameter type.', 114 + $this->getEditType())); 115 + } 116 + 110 117 return $parameter_type->getTypeName(); 111 118 } 112 119