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

Support "select" types in bulk editor (status, priority)

Summary: Depends on D18864. Ref T13025. Adds bulk edit support back for "status" and "priority" using `<select />` controls.

Test Plan:
Used bulk editor to change status and priority for tasks.

{F5374436}

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13025

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

+43 -1
+2
src/__phutil_library_map__.php
··· 223 223 'AuditQueryConduitAPIMethod' => 'applications/audit/conduit/AuditQueryConduitAPIMethod.php', 224 224 'AuthManageProvidersCapability' => 'applications/auth/capability/AuthManageProvidersCapability.php', 225 225 'BulkParameterType' => 'applications/transactions/bulk/type/BulkParameterType.php', 226 + 'BulkSelectParameterType' => 'applications/transactions/bulk/type/BulkSelectParameterType.php', 226 227 'BulkStringParameterType' => 'applications/transactions/bulk/type/BulkStringParameterType.php', 227 228 'CalendarTimeUtil' => 'applications/calendar/util/CalendarTimeUtil.php', 228 229 'CalendarTimeUtilTestCase' => 'applications/calendar/__tests__/CalendarTimeUtilTestCase.php', ··· 5244 5245 'AuditQueryConduitAPIMethod' => 'AuditConduitAPIMethod', 5245 5246 'AuthManageProvidersCapability' => 'PhabricatorPolicyCapability', 5246 5247 'BulkParameterType' => 'Phobject', 5248 + 'BulkSelectParameterType' => 'BulkParameterType', 5247 5249 'BulkStringParameterType' => 'BulkParameterType', 5248 5250 'CalendarTimeUtil' => 'Phobject', 5249 5251 'CalendarTimeUtilTestCase' => 'PhabricatorTestCase',
+2
src/applications/maniphest/editor/ManiphestEditEngine.php
··· 201 201 id(new PhabricatorSelectEditField()) 202 202 ->setKey('status') 203 203 ->setLabel(pht('Status')) 204 + ->setBulkEditLabel(pht('Set status to')) 204 205 ->setDescription(pht('Status of the task.')) 205 206 ->setConduitDescription(pht('Change the task status.')) 206 207 ->setConduitTypeDescription(pht('New task status constant.')) ··· 213 214 id(new PhabricatorSelectEditField()) 214 215 ->setKey('priority') 215 216 ->setLabel(pht('Priority')) 217 + ->setBulkEditLabel(pht('Set priority to')) 216 218 ->setDescription(pht('Priority of the task.')) 217 219 ->setConduitDescription(pht('Change the priority of the task.')) 218 220 ->setConduitTypeDescription(pht('New task priority constant.'))
+10
src/applications/transactions/bulk/type/BulkParameterType.php
··· 3 3 abstract class BulkParameterType extends Phobject { 4 4 5 5 private $viewer; 6 + private $field; 6 7 7 8 final public function setViewer(PhabricatorUser $viewer) { 8 9 $this->viewer = $viewer; ··· 11 12 12 13 final public function getViewer() { 13 14 return $this->viewer; 15 + } 16 + 17 + final public function setField(PhabricatorEditField $field) { 18 + $this->field = $field; 19 + return $this; 20 + } 21 + 22 + final public function getField() { 23 + return $this->field; 14 24 } 15 25 16 26 abstract public function getPHUIXControlType();
+22
src/applications/transactions/bulk/type/BulkSelectParameterType.php
··· 1 + <?php 2 + 3 + final class BulkSelectParameterType 4 + extends BulkParameterType { 5 + 6 + public function getOptions() { 7 + return $this->getField()->getOptions(); 8 + } 9 + 10 + public function getPHUIXControlType() { 11 + return 'select'; 12 + } 13 + 14 + public function getPHUIXControlSpecification() { 15 + return array( 16 + 'options' => $this->getOptions(), 17 + 'order' => array_keys($this->getOptions()), 18 + 'value' => null, 19 + ); 20 + } 21 + 22 + }
+3 -1
src/applications/transactions/editfield/PhabricatorEditField.php
··· 643 643 return null; 644 644 } 645 645 646 - $type->setViewer($this->getViewer()); 646 + $type 647 + ->setField($this) 648 + ->setViewer($this->getViewer()); 647 649 648 650 return $type; 649 651 }
+4
src/applications/transactions/editfield/PhabricatorSelectEditField.php
··· 54 54 return new ConduitStringParameterType(); 55 55 } 56 56 57 + protected function newBulkParameterType() { 58 + return new BulkSelectParameterType(); 59 + } 60 + 57 61 private function getCanonicalValue($value) { 58 62 $options = $this->getOptions(); 59 63 if (!isset($options[$value])) {