Page MenuHomePhabricator

D18878.diff
No OneTemporary

D18878.diff

diff --git a/src/applications/transactions/bulk/type/BulkSelectParameterType.php b/src/applications/transactions/bulk/type/BulkSelectParameterType.php
--- a/src/applications/transactions/bulk/type/BulkSelectParameterType.php
+++ b/src/applications/transactions/bulk/type/BulkSelectParameterType.php
@@ -3,8 +3,15 @@
final class BulkSelectParameterType
extends BulkParameterType {
+ private $options;
+
+ public function setOptions(array $options) {
+ $this->options = $options;
+ return $this;
+ }
+
public function getOptions() {
- return $this->getField()->getOptions();
+ return $this->options;
}
public function getPHUIXControlType() {
diff --git a/src/applications/transactions/editfield/PhabricatorSelectEditField.php b/src/applications/transactions/editfield/PhabricatorSelectEditField.php
--- a/src/applications/transactions/editfield/PhabricatorSelectEditField.php
+++ b/src/applications/transactions/editfield/PhabricatorSelectEditField.php
@@ -55,7 +55,8 @@
}
protected function newBulkParameterType() {
- return new BulkSelectParameterType();
+ return id(new BulkSelectParameterType())
+ ->setOptions($this->getOptions());
}
private function getCanonicalValue($value) {
diff --git a/src/applications/transactions/engineextension/PhabricatorSubtypeEditEngineExtension.php b/src/applications/transactions/engineextension/PhabricatorSubtypeEditEngineExtension.php
--- a/src/applications/transactions/engineextension/PhabricatorSubtypeEditEngineExtension.php
+++ b/src/applications/transactions/engineextension/PhabricatorSubtypeEditEngineExtension.php
@@ -30,6 +30,9 @@
$subtype_type = PhabricatorTransactions::TYPE_SUBTYPE;
+ $map = $object->newEditEngineSubtypeMap();
+ $options = mpull($map, 'getName');
+
$subtype_field = id(new PhabricatorSelectEditField())
->setKey(self::EDITKEY)
->setLabel(pht('Subtype'))
@@ -41,7 +44,8 @@
->setTransactionType($subtype_type)
->setConduitDescription(pht('Change the object subtype.'))
->setConduitTypeDescription(pht('New object subtype key.'))
- ->setValue($object->getEditEngineSubtype());
+ ->setValue($object->getEditEngineSubtype())
+ ->setOptions($options);
return array(
$subtype_field,

File Metadata

Mime Type
text/plain
Expires
Mar 8 2025, 3:56 PM (7 w, 6 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7383113
Default Alt Text
D18878.diff (2 KB)

Event Timeline