Page MenuHomePhabricator

D18938.id45432.diff
No OneTemporary

D18938.id45432.diff

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -590,6 +590,7 @@
'DifferentialRevisionStatus' => 'applications/differential/constants/DifferentialRevisionStatus.php',
'DifferentialRevisionStatusDatasource' => 'applications/differential/typeahead/DifferentialRevisionStatusDatasource.php',
'DifferentialRevisionStatusFunctionDatasource' => 'applications/differential/typeahead/DifferentialRevisionStatusFunctionDatasource.php',
+ 'DifferentialRevisionStatusHeraldField' => 'applications/differential/herald/DifferentialRevisionStatusHeraldField.php',
'DifferentialRevisionStatusTransaction' => 'applications/differential/xaction/DifferentialRevisionStatusTransaction.php',
'DifferentialRevisionSummaryHeraldField' => 'applications/differential/herald/DifferentialRevisionSummaryHeraldField.php',
'DifferentialRevisionSummaryTransaction' => 'applications/differential/xaction/DifferentialRevisionSummaryTransaction.php',
@@ -5701,6 +5702,7 @@
'DifferentialRevisionStatus' => 'Phobject',
'DifferentialRevisionStatusDatasource' => 'PhabricatorTypeaheadDatasource',
'DifferentialRevisionStatusFunctionDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
+ 'DifferentialRevisionStatusHeraldField' => 'DifferentialRevisionHeraldField',
'DifferentialRevisionStatusTransaction' => 'DifferentialRevisionTransactionType',
'DifferentialRevisionSummaryHeraldField' => 'DifferentialRevisionHeraldField',
'DifferentialRevisionSummaryTransaction' => 'DifferentialRevisionTransactionType',
diff --git a/src/applications/differential/herald/DifferentialRevisionStatusHeraldField.php b/src/applications/differential/herald/DifferentialRevisionStatusHeraldField.php
new file mode 100644
--- /dev/null
+++ b/src/applications/differential/herald/DifferentialRevisionStatusHeraldField.php
@@ -0,0 +1,29 @@
+<?php
+
+final class DifferentialRevisionStatusHeraldField
+ extends DifferentialRevisionHeraldField {
+
+ const FIELDCONST = 'revision.status';
+
+ public function getHeraldFieldName() {
+ return pht('Revision status');
+ }
+
+ public function getHeraldFieldValue($object) {
+ return $object->getStatus();
+ }
+
+ protected function getHeraldFieldStandardType() {
+ return self::STANDARD_PHID;
+ }
+
+ protected function getDatasource() {
+ return new DifferentialRevisionStatusDatasource();
+ }
+
+ protected function getDatasourceValueMap() {
+ $map = DifferentialRevisionStatus::getAll();
+ return mpull($map, 'getDisplayName', 'getKey');
+ }
+
+}

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 1, 12:07 PM (5 d, 38 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7706931
Default Alt Text
D18938.id45432.diff (2 KB)

Event Timeline