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

Allow "Change Subtype" to be selected from the comment action stack

Summary:
Ref T13222. See PHI683. Currently, you can "Change subtype..." via Conduit and the bulk editor, but not via the comment action stack or edit forms.

In PHI683 an install is doing this often enough that they'd like it to become a first-class action. I've generally been cautious about pushing this action to become a first-class action (there are some inevitable rough edges and I don't want to add too much complexity if there isn't a use case for it) but since we have evidence that users would find it useful and nothing has exploded yet, I'm comfortable taking another step forward.

Currently, `EditEngine` has this sort of weird `setIsConduitOnly()` method. This actually means more like "this doesn't show up on forms". Make it better align with that. In particular, a "conduit only" field can already show up in the bulk editor, which is goofy. Change this to `setIsFormField()` and convert/simplify existing callsites.

Test Plan:
There are a lot of ways to reach EditEngine so this probably isn't entirely exhaustive, but I think I got pretty much anything which is likely to break:

- Searched for `setIsConduitOnly()` and `getIsConduitOnly()`, converted all callsites to `setIsFormField()`.
- Searched for `setIsLockable()`, `setIsReorderable()` and `setIsDefaultable()` and aligned these calls to intent where applicable.
- Created an Almanac binding.
- Edited an Almanac binding.
- Created an Almanac service.
- Edited an Almanac service.
- Edited a binding property.
- Deleted a binding property.
- Created and edited a badge.
- Awarded and revoked a badge.
- Created and edited an event.
- Made an event recurring.
- Created and edited a Conpherence thread.
- Edited and updated the diff for a revision.
- Created and edited a repository.
- Created and disabled repository URIs.
- Created and edited a blueprint.
- Created and edited tasks.
- Created a paste, edited/archived a paste.
- Created/edited/archived a package.
- Created/edited a project.
- Made comments.
- Moved tasks on workboards via comment action stack.
- Changed task subtype via comment action stack.

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13222

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

+85 -68
+3 -3
src/applications/almanac/editor/AlmanacBindingEditEngine.php
··· 136 136 id(new PhabricatorTextEditField()) 137 137 ->setKey('service') 138 138 ->setLabel(pht('Service')) 139 - ->setIsConduitOnly(true) 139 + ->setIsFormField(false) 140 140 ->setTransactionType( 141 141 AlmanacBindingServiceTransaction::TRANSACTIONTYPE) 142 142 ->setDescription(pht('Service to create a binding for.')) ··· 146 146 id(new PhabricatorTextEditField()) 147 147 ->setKey('interface') 148 148 ->setLabel(pht('Interface')) 149 - ->setIsConduitOnly(true) 149 + ->setIsFormField(false) 150 150 ->setTransactionType( 151 151 AlmanacBindingInterfaceTransaction::TRANSACTIONTYPE) 152 152 ->setDescription(pht('Interface to bind the service to.')) ··· 156 156 id(new PhabricatorBoolEditField()) 157 157 ->setKey('disabled') 158 158 ->setLabel(pht('Disabled')) 159 - ->setIsConduitOnly(true) 159 + ->setIsFormField(false) 160 160 ->setTransactionType( 161 161 AlmanacBindingDisableTransaction::TRANSACTIONTYPE) 162 162 ->setDescription(pht('Disable or enable the binding.'))
+1 -1
src/applications/almanac/editor/AlmanacInterfaceEditEngine.php
··· 150 150 id(new PhabricatorTextEditField()) 151 151 ->setKey('device') 152 152 ->setLabel(pht('Device')) 153 - ->setIsConduitOnly(true) 153 + ->setIsFormField(false) 154 154 ->setTransactionType( 155 155 AlmanacInterfaceDeviceTransaction::TRANSACTIONTYPE) 156 156 ->setDescription(pht('When creating an interface, set the device.'))
+1 -1
src/applications/almanac/editor/AlmanacServiceEditEngine.php
··· 136 136 id(new PhabricatorTextEditField()) 137 137 ->setKey('type') 138 138 ->setLabel(pht('Type')) 139 - ->setIsConduitOnly(true) 139 + ->setIsFormField(false) 140 140 ->setTransactionType( 141 141 AlmanacServiceTypeTransaction::TRANSACTIONTYPE) 142 142 ->setDescription(pht('When creating a service, set the type.'))
+2 -2
src/applications/almanac/engineextension/AlmanacPropertiesEditEngineExtension.php
··· 30 30 ->setConduitDescription( 31 31 pht('Pass a map of values to set one or more properties.')) 32 32 ->setConduitTypeDescription(pht('Map of property names to values.')) 33 - ->setIsConduitOnly(true), 33 + ->setIsFormField(false), 34 34 id(new AlmanacDeletePropertyEditField()) 35 35 ->setKey('property.delete') 36 36 ->setTransactionType($object->getAlmanacPropertyDeleteTransactionType()) 37 37 ->setConduitDescription( 38 38 pht('Pass a list of property names to delete properties.')) 39 39 ->setConduitTypeDescription(pht('List of property names.')) 40 - ->setIsConduitOnly(true), 40 + ->setIsFormField(false), 41 41 ); 42 42 } 43 43
+2 -2
src/applications/badges/editor/PhabricatorBadgesEditEngine.php
··· 126 126 ->setValue($object->getDescription()), 127 127 id(new PhabricatorUsersEditField()) 128 128 ->setKey('award') 129 - ->setIsConduitOnly(true) 129 + ->setIsFormField(false) 130 130 ->setDescription(pht('New badge award recipients.')) 131 131 ->setConduitTypeDescription(pht('New badge award recipients.')) 132 132 ->setTransactionType( ··· 134 134 ->setLabel(pht('Award Recipients')), 135 135 id(new PhabricatorUsersEditField()) 136 136 ->setKey('revoke') 137 - ->setIsConduitOnly(true) 137 + ->setIsFormField(false) 138 138 ->setDescription(pht('Revoke badge award recipients.')) 139 139 ->setConduitTypeDescription(pht('Revoke badge award recipients.')) 140 140 ->setTransactionType(
+2 -2
src/applications/calendar/editor/PhabricatorCalendarEventEditEngine.php
··· 148 148 ->setDescription(pht('Cancel the event.')) 149 149 ->setTransactionType( 150 150 PhabricatorCalendarEventCancelTransaction::TRANSACTIONTYPE) 151 - ->setIsConduitOnly(true) 151 + ->setIsFormField(false) 152 152 ->setConduitDescription(pht('Cancel or restore the event.')) 153 153 ->setConduitTypeDescription(pht('True to cancel the event.')) 154 154 ->setValue($object->getIsCancelled()), ··· 161 161 ->setDescription(pht('Host of the event.')) 162 162 ->setTransactionType( 163 163 PhabricatorCalendarEventHostTransaction::TRANSACTIONTYPE) 164 - ->setIsConduitOnly($this->getIsCreate()) 164 + ->setIsFormField(!$this->getIsCreate()) 165 165 ->setConduitDescription(pht('Change the host of the event.')) 166 166 ->setConduitTypeDescription(pht('New event host.')) 167 167 ->setSingleValue($object->getHostPHID()),
+1 -1
src/applications/calendar/editor/PhabricatorCalendarExportEditEngine.php
··· 99 99 ->setDescription(pht('Disable the export.')) 100 100 ->setTransactionType( 101 101 PhabricatorCalendarExportDisableTransaction::TRANSACTIONTYPE) 102 - ->setIsConduitOnly(true) 102 + ->setIsFormField(false) 103 103 ->setConduitDescription(pht('Disable or restore the export.')) 104 104 ->setConduitTypeDescription(pht('True to cancel the export.')) 105 105 ->setValue($object->getIsDisabled()),
+3 -3
src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php
··· 101 101 ->setDescription(pht('Disable the import.')) 102 102 ->setTransactionType( 103 103 PhabricatorCalendarImportDisableTransaction::TRANSACTIONTYPE) 104 - ->setIsConduitOnly(true) 104 + ->setIsFormField(false) 105 105 ->setConduitDescription(pht('Disable or restore the import.')) 106 106 ->setConduitTypeDescription(pht('True to cancel the import.')) 107 107 ->setValue($object->getIsDisabled()), ··· 111 111 ->setDescription(pht('Delete all events from this source.')) 112 112 ->setTransactionType( 113 113 PhabricatorCalendarImportDisableTransaction::TRANSACTIONTYPE) 114 - ->setIsConduitOnly(true) 114 + ->setIsFormField(false) 115 115 ->setConduitDescription(pht('Disable or restore the import.')) 116 116 ->setConduitTypeDescription(pht('True to delete imported events.')) 117 117 ->setValue(false), ··· 121 121 ->setDescription(pht('Reload events imported from this source.')) 122 122 ->setTransactionType( 123 123 PhabricatorCalendarImportDisableTransaction::TRANSACTIONTYPE) 124 - ->setIsConduitOnly(true) 124 + ->setIsFormField(false) 125 125 ->setConduitDescription(pht('Disable or restore the import.')) 126 126 ->setConduitTypeDescription(pht('True to reload the import.')) 127 127 ->setValue(false),
+3 -3
src/applications/conpherence/editor/ConpherenceEditEngine.php
··· 76 76 $initial_phids = $participant_phids; 77 77 } 78 78 79 - // Only show participants on create or conduit, not edit 80 - $conduit_only = !$this->getIsCreate(); 79 + // Only show participants on create or conduit, not edit. 80 + $show_participants = (bool)$this->getIsCreate(); 81 81 82 82 return array( 83 83 id(new PhabricatorTextEditField()) ··· 103 103 ->setKey('participants') 104 104 ->setValue($participant_phids) 105 105 ->setInitialValue($initial_phids) 106 - ->setIsConduitOnly($conduit_only) 106 + ->setIsFormField($show_participants) 107 107 ->setAliases(array('users', 'members', 'participants', 'userPHID')) 108 108 ->setDescription(pht('Room participants.')) 109 109 ->setUseEdgeTransactions(true)
+3 -3
src/applications/differential/editor/DifferentialRevisionEditEngine.php
··· 138 138 DifferentialRevisionUpdateTransaction::TRANSACTIONTYPE) 139 139 ->setHandleParameterType(new AphrontPHIDListHTTPParameterType()) 140 140 ->setSingleValue($diff_phid) 141 - ->setIsConduitOnly(!$diff) 141 + ->setIsFormField((bool)$diff) 142 142 ->setIsReorderable(false) 143 143 ->setIsDefaultable(false) 144 144 ->setIsInvisible(true) ··· 225 225 $fields[] = id(new PhabricatorHandlesEditField()) 226 226 ->setKey('tasks') 227 227 ->setUseEdgeTransactions(true) 228 - ->setIsConduitOnly(true) 228 + ->setIsFormField(false) 229 229 ->setTransactionType(PhabricatorTransactions::TYPE_EDGE) 230 230 ->setMetadataValue( 231 231 'edge:type', ··· 245 245 $fields[] = id(new PhabricatorBoolEditField()) 246 246 ->setKey('draft') 247 247 ->setLabel(pht('Hold as Draft')) 248 - ->setIsConduitOnly(true) 248 + ->setIsFormField(false) 249 249 ->setOptions( 250 250 pht('Autosubmit Once Builds Finish'), 251 251 pht('Hold as Draft'))
+4 -4
src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
··· 244 244 ->setKey('vcs') 245 245 ->setLabel(pht('Version Control System')) 246 246 ->setTransactionType(PhabricatorRepositoryTransaction::TYPE_VCS) 247 - ->setIsConduitOnly(true) 247 + ->setIsFormField(false) 248 248 ->setIsCopyable(true) 249 249 ->setOptions(PhabricatorRepositoryType::getAllRepositoryTypes()) 250 250 ->setDescription(pht('Underlying repository version control system.')) ··· 300 300 ->setKey('allowDangerousChanges') 301 301 ->setLabel(pht('Allow Dangerous Changes')) 302 302 ->setIsCopyable(true) 303 - ->setIsConduitOnly(true) 303 + ->setIsFormField(false) 304 304 ->setOptions( 305 305 pht('Prevent Dangerous Changes'), 306 306 pht('Allow Dangerous Changes')) ··· 313 313 ->setKey('allowEnormousChanges') 314 314 ->setLabel(pht('Allow Enormous Changes')) 315 315 ->setIsCopyable(true) 316 - ->setIsConduitOnly(true) 316 + ->setIsFormField(false) 317 317 ->setOptions( 318 318 pht('Prevent Enormous Changes'), 319 319 pht('Allow Enormous Changes')) ··· 326 326 ->setKey('status') 327 327 ->setLabel(pht('Status')) 328 328 ->setTransactionType(PhabricatorRepositoryTransaction::TYPE_ACTIVATE) 329 - ->setIsConduitOnly(true) 329 + ->setIsFormField(false) 330 330 ->setOptions(PhabricatorRepository::getStatusNameMap()) 331 331 ->setDescription(pht('Active or inactive status.')) 332 332 ->setConduitDescription(pht('Active or deactivate the repository.'))
+3 -3
src/applications/diffusion/editor/DiffusionURIEditEngine.php
··· 150 150 ->setAliases(array('repositoryPHID')) 151 151 ->setLabel(pht('Repository')) 152 152 ->setIsRequired(true) 153 - ->setIsConduitOnly(true) 153 + ->setIsFormField(false) 154 154 ->setTransactionType( 155 155 PhabricatorRepositoryURITransaction::TYPE_REPOSITORY) 156 156 ->setDescription(pht('The repository this URI is associated with.')) ··· 195 195 ->setKey('credential') 196 196 ->setAliases(array('credentialPHID')) 197 197 ->setLabel(pht('Credential')) 198 - ->setIsConduitOnly(true) 198 + ->setIsFormField(false) 199 199 ->setTransactionType( 200 200 PhabricatorRepositoryURITransaction::TYPE_CREDENTIAL) 201 201 ->setDescription( ··· 206 206 id(new PhabricatorBoolEditField()) 207 207 ->setKey('disable') 208 208 ->setLabel(pht('Disabled')) 209 - ->setIsConduitOnly(true) 209 + ->setIsFormField(false) 210 210 ->setTransactionType(PhabricatorRepositoryURITransaction::TYPE_DISABLE) 211 211 ->setDescription(pht('Active status of the URI.')) 212 212 ->setConduitDescription(pht('Disable or activate the URI.'))
+1 -1
src/applications/drydock/editor/DrydockBlueprintEditEngine.php
··· 153 153 id(new PhabricatorTextEditField()) 154 154 ->setKey('type') 155 155 ->setLabel(pht('Type')) 156 - ->setIsConduitOnly(true) 156 + ->setIsFormField(false) 157 157 ->setTransactionType( 158 158 DrydockBlueprintTypeTransaction::TRANSACTIONTYPE) 159 159 ->setDescription(pht('When creating a blueprint, set the type.'))
+3 -5
src/applications/maniphest/editor/ManiphestEditEngine.php
··· 169 169 ->setConduitDocumentation($column_documentation) 170 170 ->setAliases(array('columnPHID', 'columns', 'columnPHIDs')) 171 171 ->setTransactionType(PhabricatorTransactions::TYPE_COLUMNS) 172 - ->setIsReorderable(false) 173 - ->setIsDefaultable(false) 174 - ->setIsLockable(false) 172 + ->setIsFormField(false) 175 173 ->setCommentActionLabel(pht('Move on Workboard')) 176 174 ->setCommentActionOrder(2000) 177 175 ->setColumnMap($column_map), ··· 291 289 ->setConduitDescription(pht('Change the parents of this task.')) 292 290 ->setConduitTypeDescription(pht('List of parent task PHIDs.')) 293 291 ->setUseEdgeTransactions(true) 294 - ->setIsConduitOnly(true) 292 + ->setIsFormField(false) 295 293 ->setTransactionType(PhabricatorTransactions::TYPE_EDGE) 296 294 ->setMetadataValue('edge:type', $parent_type) 297 295 ->setValue($parent_phids); ··· 303 301 ->setConduitDescription(pht('Change the subtasks of this task.')) 304 302 ->setConduitTypeDescription(pht('List of subtask PHIDs.')) 305 303 ->setUseEdgeTransactions(true) 306 - ->setIsConduitOnly(true) 304 + ->setIsFormField(false) 307 305 ->setTransactionType(PhabricatorTransactions::TYPE_EDGE) 308 306 ->setMetadataValue('edge:type', $subtask_type) 309 307 ->setValue($parent_phids);
+2 -2
src/applications/owners/editor/PhabricatorOwnersPackageEditEngine.php
··· 159 159 ->setDescription(pht('Archive or enable the package.')) 160 160 ->setTransactionType( 161 161 PhabricatorOwnersPackageStatusTransaction::TRANSACTIONTYPE) 162 - ->setIsConduitOnly(true) 162 + ->setIsFormField(false) 163 163 ->setValue($object->getStatus()) 164 164 ->setOptions($object->getStatusNameMap()), 165 165 id(new PhabricatorCheckboxesEditField()) ··· 176 176 id(new PhabricatorConduitEditField()) 177 177 ->setKey('paths.set') 178 178 ->setLabel(pht('Paths')) 179 - ->setIsConduitOnly(true) 179 + ->setIsFormField(false) 180 180 ->setTransactionType( 181 181 PhabricatorOwnersPackagePathsTransaction::TRANSACTIONTYPE) 182 182 ->setConduitDescription(
+1 -1
src/applications/paste/editor/PhabricatorPasteEditEngine.php
··· 104 104 ->setLabel(pht('Status')) 105 105 ->setTransactionType( 106 106 PhabricatorPasteStatusTransaction::TRANSACTIONTYPE) 107 - ->setIsConduitOnly(true) 107 + ->setIsFormField(false) 108 108 ->setOptions(PhabricatorPaste::getStatusNameMap()) 109 109 ->setDescription(pht('Active or archived status.')) 110 110 ->setConduitDescription(pht('Active or archive the paste.'))
+1 -1
src/applications/people/editor/PhabricatorUserEditEngine.php
··· 71 71 ->setLabel(pht('Disabled')) 72 72 ->setDescription(pht('Disable the user.')) 73 73 ->setTransactionType(PhabricatorUserDisableTransaction::TRANSACTIONTYPE) 74 - ->setIsConduitOnly(true) 74 + ->setIsFormField(false) 75 75 ->setConduitDescription(pht('Disable or enable the user.')) 76 76 ->setConduitTypeDescription(pht('True to disable the user.')) 77 77 ->setValue($object->getIsDisabled()),
+1 -1
src/applications/phame/editor/PhameBlogEditEngine.php
··· 126 126 ->setKey('status') 127 127 ->setLabel(pht('Status')) 128 128 ->setTransactionType(PhameBlogStatusTransaction::TRANSACTIONTYPE) 129 - ->setIsConduitOnly(true) 129 + ->setIsFormField(false) 130 130 ->setOptions(PhameBlog::getStatusNameMap()) 131 131 ->setDescription(pht('Active or archived status.')) 132 132 ->setConduitDescription(pht('Active or archive the blog.'))
+2 -2
src/applications/project/engine/PhabricatorProjectEditEngine.php
··· 287 287 288 288 // Show this on the web UI when creating a project, but not when editing 289 289 // one. It is always available via Conduit. 290 - $conduit_only = !$this->getIsCreate(); 290 + $show_field = (bool)$this->getIsCreate(); 291 291 292 292 $members_field = id(new PhabricatorUsersEditField()) 293 293 ->setKey('members') 294 294 ->setAliases(array('memberPHIDs')) 295 295 ->setLabel(pht('Initial Members')) 296 - ->setIsConduitOnly($conduit_only) 296 + ->setIsFormField($show_field) 297 297 ->setUseEdgeTransactions(true) 298 298 ->setTransactionType(PhabricatorTransactions::TYPE_EDGE) 299 299 ->setMetadataValue(
+5
src/applications/transactions/controller/PhabricatorEditEngineConfigurationDefaultsController.php
··· 30 30 $fields = $engine->getFieldsForConfig($config); 31 31 32 32 foreach ($fields as $key => $field) { 33 + if (!$field->getIsFormField()) { 34 + unset($fields[$key]); 35 + continue; 36 + } 37 + 33 38 if (!$field->getIsDefaultable()) { 34 39 unset($fields[$key]); 35 40 continue;
+4
src/applications/transactions/controller/PhabricatorEditEngineConfigurationLockController.php
··· 79 79 ); 80 80 81 81 foreach ($fields as $field) { 82 + if (!$field->getIsFormField()) { 83 + continue; 84 + } 85 + 82 86 if (!$field->getIsLockable()) { 83 87 continue; 84 88 }
+4
src/applications/transactions/controller/PhabricatorEditEngineConfigurationReorderController.php
··· 62 62 63 63 $key_order = array(); 64 64 foreach ($fields as $field) { 65 + if (!$field->getIsFormField()) { 66 + continue; 67 + } 68 + 65 69 if (!$field->getIsReorderable()) { 66 70 continue; 67 71 }
+4
src/applications/transactions/editengine/PhabricatorEditEngine.php
··· 1289 1289 } 1290 1290 1291 1291 foreach ($fields as $field) { 1292 + if (!$field->getIsFormField()) { 1293 + continue; 1294 + } 1295 + 1292 1296 $field->appendToForm($form); 1293 1297 } 1294 1298
+11 -11
src/applications/transactions/editfield/PhabricatorEditField.php
··· 44 44 private $isDefaultable = true; 45 45 private $isLockable = true; 46 46 private $isCopyable = false; 47 - private $isConduitOnly = false; 47 + private $isFormField = true; 48 48 49 49 private $conduitEditTypes; 50 50 private $bulkEditTypes; ··· 139 139 return $this->isReorderable; 140 140 } 141 141 142 - public function setIsConduitOnly($is_conduit_only) { 143 - $this->isConduitOnly = $is_conduit_only; 142 + public function setIsFormField($is_form_field) { 143 + $this->isFormField = $is_form_field; 144 144 return $this; 145 145 } 146 146 147 - public function getIsConduitOnly() { 148 - return $this->isConduitOnly; 147 + public function getIsFormField() { 148 + return $this->isFormField; 149 149 } 150 150 151 151 public function setDescription($description) { ··· 336 336 } 337 337 338 338 protected function buildControl() { 339 - if ($this->getIsConduitOnly()) { 339 + if (!$this->getIsFormField()) { 340 340 return null; 341 341 } 342 342 ··· 637 637 } 638 638 639 639 final public function getHTTPParameterType() { 640 - if ($this->getIsConduitOnly()) { 640 + if (!$this->getIsFormField()) { 641 641 return null; 642 642 } 643 643 ··· 840 840 } 841 841 842 842 public function shouldGenerateTransactionsFromSubmit() { 843 - if ($this->getIsConduitOnly()) { 843 + if (!$this->getIsFormField()) { 844 844 return false; 845 845 } 846 846 ··· 853 853 } 854 854 855 855 public function shouldReadValueFromRequest() { 856 - if ($this->getIsConduitOnly()) { 856 + if (!$this->getIsFormField()) { 857 857 return false; 858 858 } 859 859 ··· 869 869 } 870 870 871 871 public function shouldReadValueFromSubmit() { 872 - if ($this->getIsConduitOnly()) { 872 + if (!$this->getIsFormField()) { 873 873 return false; 874 874 } 875 875 ··· 885 885 } 886 886 887 887 public function shouldGenerateTransactionsFromComment() { 888 - if ($this->getIsConduitOnly()) { 888 + if (!$this->getCommentActionLabel()) { 889 889 return false; 890 890 } 891 891
+1 -4
src/applications/transactions/engineextension/PhabricatorCommentEditEngineExtension.php
··· 57 57 ->setBulkEditLabel(pht('Add comment')) 58 58 ->setBulkEditGroupKey('comments') 59 59 ->setAliases(array('comments')) 60 - ->setIsHidden(true) 61 - ->setIsReorderable(false) 62 - ->setIsDefaultable(false) 63 - ->setIsLockable(false) 60 + ->setIsFormField(false) 64 61 ->setCanApplyWithoutEditCapability($is_interact) 65 62 ->setTransactionType($comment_type) 66 63 ->setConduitDescription(pht('Make comments.'))
+7 -7
src/applications/transactions/engineextension/PhabricatorSubtypeEditEngineExtension.php
··· 36 36 $subtype_field = id(new PhabricatorSelectEditField()) 37 37 ->setKey(self::EDITKEY) 38 38 ->setLabel(pht('Subtype')) 39 - ->setIsConduitOnly(true) 40 - ->setIsHidden(true) 41 - ->setIsReorderable(false) 42 - ->setIsDefaultable(false) 43 - ->setIsLockable(false) 39 + ->setIsFormField(false) 44 40 ->setTransactionType($subtype_type) 45 41 ->setConduitDescription(pht('Change the object subtype.')) 46 42 ->setConduitTypeDescription(pht('New object subtype key.')) 47 43 ->setValue($object->getEditEngineSubtype()) 48 44 ->setOptions($options); 49 45 50 - // If subtypes are configured, enable changing them from the bulk editor. 46 + // If subtypes are configured, enable changing them from the bulk editor 47 + // and comment action stack. 51 48 if (count($map) > 1) { 52 - $subtype_field->setBulkEditLabel(pht('Change subtype to')); 49 + $subtype_field 50 + ->setBulkEditLabel(pht('Change subtype to')) 51 + ->setCommentActionLabel(pht('Change Subtype')) 52 + ->setCommentActionOrder(3000); 53 53 } 54 54 55 55 return array(
+5
src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php
··· 139 139 140 140 $values = $this->getProperty('defaults', array()); 141 141 foreach ($fields as $key => $field) { 142 + if (!$field->getIsFormField()) { 143 + continue; 144 + } 145 + 142 146 if (!$field->getIsDefaultable()) { 143 147 continue; 144 148 } 149 + 145 150 if ($is_new) { 146 151 if (array_key_exists($key, $values)) { 147 152 $field->readDefaultValueFromConfiguration($values[$key]);
+1 -1
src/infrastructure/customfield/editor/PhabricatorCustomFieldEditField.php
··· 59 59 } 60 60 61 61 protected function buildControl() { 62 - if ($this->getIsConduitOnly()) { 62 + if (!$this->getIsFormField()) { 63 63 return null; 64 64 } 65 65
+4 -4
src/infrastructure/customfield/field/PhabricatorCustomField.php
··· 1145 1145 return $this->proxy->newStandardEditField(); 1146 1146 } 1147 1147 1148 - if (!$this->shouldAppearInEditView()) { 1149 - $conduit_only = true; 1148 + if ($this->shouldAppearInEditView()) { 1149 + $form_field = true; 1150 1150 } else { 1151 - $conduit_only = false; 1151 + $form_field = false; 1152 1152 } 1153 1153 1154 1154 $bulk_label = $this->getBulkEditLabel(); ··· 1160 1160 ->setBulkEditLabel($bulk_label) 1161 1161 ->setDescription($this->getFieldDescription()) 1162 1162 ->setTransactionType($this->getApplicationTransactionType()) 1163 - ->setIsConduitOnly($conduit_only) 1163 + ->setIsFormField($form_field) 1164 1164 ->setValue($this->getNewValueForApplicationTransactions()); 1165 1165 } 1166 1166