Page MenuHomePhabricator

D19842.diff
No OneTemporary

D19842.diff

diff --git a/src/applications/almanac/editor/AlmanacBindingEditEngine.php b/src/applications/almanac/editor/AlmanacBindingEditEngine.php
--- a/src/applications/almanac/editor/AlmanacBindingEditEngine.php
+++ b/src/applications/almanac/editor/AlmanacBindingEditEngine.php
@@ -136,7 +136,7 @@
id(new PhabricatorTextEditField())
->setKey('service')
->setLabel(pht('Service'))
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setTransactionType(
AlmanacBindingServiceTransaction::TRANSACTIONTYPE)
->setDescription(pht('Service to create a binding for.'))
@@ -146,7 +146,7 @@
id(new PhabricatorTextEditField())
->setKey('interface')
->setLabel(pht('Interface'))
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setTransactionType(
AlmanacBindingInterfaceTransaction::TRANSACTIONTYPE)
->setDescription(pht('Interface to bind the service to.'))
@@ -156,7 +156,7 @@
id(new PhabricatorBoolEditField())
->setKey('disabled')
->setLabel(pht('Disabled'))
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setTransactionType(
AlmanacBindingDisableTransaction::TRANSACTIONTYPE)
->setDescription(pht('Disable or enable the binding.'))
diff --git a/src/applications/almanac/editor/AlmanacInterfaceEditEngine.php b/src/applications/almanac/editor/AlmanacInterfaceEditEngine.php
--- a/src/applications/almanac/editor/AlmanacInterfaceEditEngine.php
+++ b/src/applications/almanac/editor/AlmanacInterfaceEditEngine.php
@@ -150,7 +150,7 @@
id(new PhabricatorTextEditField())
->setKey('device')
->setLabel(pht('Device'))
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setTransactionType(
AlmanacInterfaceDeviceTransaction::TRANSACTIONTYPE)
->setDescription(pht('When creating an interface, set the device.'))
diff --git a/src/applications/almanac/editor/AlmanacServiceEditEngine.php b/src/applications/almanac/editor/AlmanacServiceEditEngine.php
--- a/src/applications/almanac/editor/AlmanacServiceEditEngine.php
+++ b/src/applications/almanac/editor/AlmanacServiceEditEngine.php
@@ -136,7 +136,7 @@
id(new PhabricatorTextEditField())
->setKey('type')
->setLabel(pht('Type'))
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setTransactionType(
AlmanacServiceTypeTransaction::TRANSACTIONTYPE)
->setDescription(pht('When creating a service, set the type.'))
diff --git a/src/applications/almanac/engineextension/AlmanacPropertiesEditEngineExtension.php b/src/applications/almanac/engineextension/AlmanacPropertiesEditEngineExtension.php
--- a/src/applications/almanac/engineextension/AlmanacPropertiesEditEngineExtension.php
+++ b/src/applications/almanac/engineextension/AlmanacPropertiesEditEngineExtension.php
@@ -30,14 +30,14 @@
->setConduitDescription(
pht('Pass a map of values to set one or more properties.'))
->setConduitTypeDescription(pht('Map of property names to values.'))
- ->setIsConduitOnly(true),
+ ->setIsFormField(false),
id(new AlmanacDeletePropertyEditField())
->setKey('property.delete')
->setTransactionType($object->getAlmanacPropertyDeleteTransactionType())
->setConduitDescription(
pht('Pass a list of property names to delete properties.'))
->setConduitTypeDescription(pht('List of property names.'))
- ->setIsConduitOnly(true),
+ ->setIsFormField(false),
);
}
diff --git a/src/applications/badges/editor/PhabricatorBadgesEditEngine.php b/src/applications/badges/editor/PhabricatorBadgesEditEngine.php
--- a/src/applications/badges/editor/PhabricatorBadgesEditEngine.php
+++ b/src/applications/badges/editor/PhabricatorBadgesEditEngine.php
@@ -126,7 +126,7 @@
->setValue($object->getDescription()),
id(new PhabricatorUsersEditField())
->setKey('award')
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setDescription(pht('New badge award recipients.'))
->setConduitTypeDescription(pht('New badge award recipients.'))
->setTransactionType(
@@ -134,7 +134,7 @@
->setLabel(pht('Award Recipients')),
id(new PhabricatorUsersEditField())
->setKey('revoke')
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setDescription(pht('Revoke badge award recipients.'))
->setConduitTypeDescription(pht('Revoke badge award recipients.'))
->setTransactionType(
diff --git a/src/applications/calendar/editor/PhabricatorCalendarEventEditEngine.php b/src/applications/calendar/editor/PhabricatorCalendarEventEditEngine.php
--- a/src/applications/calendar/editor/PhabricatorCalendarEventEditEngine.php
+++ b/src/applications/calendar/editor/PhabricatorCalendarEventEditEngine.php
@@ -148,7 +148,7 @@
->setDescription(pht('Cancel the event.'))
->setTransactionType(
PhabricatorCalendarEventCancelTransaction::TRANSACTIONTYPE)
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setConduitDescription(pht('Cancel or restore the event.'))
->setConduitTypeDescription(pht('True to cancel the event.'))
->setValue($object->getIsCancelled()),
@@ -161,7 +161,7 @@
->setDescription(pht('Host of the event.'))
->setTransactionType(
PhabricatorCalendarEventHostTransaction::TRANSACTIONTYPE)
- ->setIsConduitOnly($this->getIsCreate())
+ ->setIsFormField(!$this->getIsCreate())
->setConduitDescription(pht('Change the host of the event.'))
->setConduitTypeDescription(pht('New event host.'))
->setSingleValue($object->getHostPHID()),
diff --git a/src/applications/calendar/editor/PhabricatorCalendarExportEditEngine.php b/src/applications/calendar/editor/PhabricatorCalendarExportEditEngine.php
--- a/src/applications/calendar/editor/PhabricatorCalendarExportEditEngine.php
+++ b/src/applications/calendar/editor/PhabricatorCalendarExportEditEngine.php
@@ -99,7 +99,7 @@
->setDescription(pht('Disable the export.'))
->setTransactionType(
PhabricatorCalendarExportDisableTransaction::TRANSACTIONTYPE)
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setConduitDescription(pht('Disable or restore the export.'))
->setConduitTypeDescription(pht('True to cancel the export.'))
->setValue($object->getIsDisabled()),
diff --git a/src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php b/src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php
--- a/src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php
+++ b/src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php
@@ -101,7 +101,7 @@
->setDescription(pht('Disable the import.'))
->setTransactionType(
PhabricatorCalendarImportDisableTransaction::TRANSACTIONTYPE)
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setConduitDescription(pht('Disable or restore the import.'))
->setConduitTypeDescription(pht('True to cancel the import.'))
->setValue($object->getIsDisabled()),
@@ -111,7 +111,7 @@
->setDescription(pht('Delete all events from this source.'))
->setTransactionType(
PhabricatorCalendarImportDisableTransaction::TRANSACTIONTYPE)
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setConduitDescription(pht('Disable or restore the import.'))
->setConduitTypeDescription(pht('True to delete imported events.'))
->setValue(false),
@@ -121,7 +121,7 @@
->setDescription(pht('Reload events imported from this source.'))
->setTransactionType(
PhabricatorCalendarImportDisableTransaction::TRANSACTIONTYPE)
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setConduitDescription(pht('Disable or restore the import.'))
->setConduitTypeDescription(pht('True to reload the import.'))
->setValue(false),
diff --git a/src/applications/conpherence/editor/ConpherenceEditEngine.php b/src/applications/conpherence/editor/ConpherenceEditEngine.php
--- a/src/applications/conpherence/editor/ConpherenceEditEngine.php
+++ b/src/applications/conpherence/editor/ConpherenceEditEngine.php
@@ -76,8 +76,8 @@
$initial_phids = $participant_phids;
}
- // Only show participants on create or conduit, not edit
- $conduit_only = !$this->getIsCreate();
+ // Only show participants on create or conduit, not edit.
+ $show_participants = (bool)$this->getIsCreate();
return array(
id(new PhabricatorTextEditField())
@@ -103,7 +103,7 @@
->setKey('participants')
->setValue($participant_phids)
->setInitialValue($initial_phids)
- ->setIsConduitOnly($conduit_only)
+ ->setIsFormField($show_participants)
->setAliases(array('users', 'members', 'participants', 'userPHID'))
->setDescription(pht('Room participants.'))
->setUseEdgeTransactions(true)
diff --git a/src/applications/differential/editor/DifferentialRevisionEditEngine.php b/src/applications/differential/editor/DifferentialRevisionEditEngine.php
--- a/src/applications/differential/editor/DifferentialRevisionEditEngine.php
+++ b/src/applications/differential/editor/DifferentialRevisionEditEngine.php
@@ -138,7 +138,7 @@
DifferentialRevisionUpdateTransaction::TRANSACTIONTYPE)
->setHandleParameterType(new AphrontPHIDListHTTPParameterType())
->setSingleValue($diff_phid)
- ->setIsConduitOnly(!$diff)
+ ->setIsFormField((bool)$diff)
->setIsReorderable(false)
->setIsDefaultable(false)
->setIsInvisible(true)
@@ -225,7 +225,7 @@
$fields[] = id(new PhabricatorHandlesEditField())
->setKey('tasks')
->setUseEdgeTransactions(true)
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setTransactionType(PhabricatorTransactions::TYPE_EDGE)
->setMetadataValue(
'edge:type',
@@ -245,7 +245,7 @@
$fields[] = id(new PhabricatorBoolEditField())
->setKey('draft')
->setLabel(pht('Hold as Draft'))
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setOptions(
pht('Autosubmit Once Builds Finish'),
pht('Hold as Draft'))
diff --git a/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php b/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
--- a/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
+++ b/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
@@ -244,7 +244,7 @@
->setKey('vcs')
->setLabel(pht('Version Control System'))
->setTransactionType(PhabricatorRepositoryTransaction::TYPE_VCS)
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setIsCopyable(true)
->setOptions(PhabricatorRepositoryType::getAllRepositoryTypes())
->setDescription(pht('Underlying repository version control system.'))
@@ -300,7 +300,7 @@
->setKey('allowDangerousChanges')
->setLabel(pht('Allow Dangerous Changes'))
->setIsCopyable(true)
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setOptions(
pht('Prevent Dangerous Changes'),
pht('Allow Dangerous Changes'))
@@ -313,7 +313,7 @@
->setKey('allowEnormousChanges')
->setLabel(pht('Allow Enormous Changes'))
->setIsCopyable(true)
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setOptions(
pht('Prevent Enormous Changes'),
pht('Allow Enormous Changes'))
@@ -326,7 +326,7 @@
->setKey('status')
->setLabel(pht('Status'))
->setTransactionType(PhabricatorRepositoryTransaction::TYPE_ACTIVATE)
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setOptions(PhabricatorRepository::getStatusNameMap())
->setDescription(pht('Active or inactive status.'))
->setConduitDescription(pht('Active or deactivate the repository.'))
diff --git a/src/applications/diffusion/editor/DiffusionURIEditEngine.php b/src/applications/diffusion/editor/DiffusionURIEditEngine.php
--- a/src/applications/diffusion/editor/DiffusionURIEditEngine.php
+++ b/src/applications/diffusion/editor/DiffusionURIEditEngine.php
@@ -150,7 +150,7 @@
->setAliases(array('repositoryPHID'))
->setLabel(pht('Repository'))
->setIsRequired(true)
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setTransactionType(
PhabricatorRepositoryURITransaction::TYPE_REPOSITORY)
->setDescription(pht('The repository this URI is associated with.'))
@@ -195,7 +195,7 @@
->setKey('credential')
->setAliases(array('credentialPHID'))
->setLabel(pht('Credential'))
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setTransactionType(
PhabricatorRepositoryURITransaction::TYPE_CREDENTIAL)
->setDescription(
@@ -206,7 +206,7 @@
id(new PhabricatorBoolEditField())
->setKey('disable')
->setLabel(pht('Disabled'))
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setTransactionType(PhabricatorRepositoryURITransaction::TYPE_DISABLE)
->setDescription(pht('Active status of the URI.'))
->setConduitDescription(pht('Disable or activate the URI.'))
diff --git a/src/applications/drydock/editor/DrydockBlueprintEditEngine.php b/src/applications/drydock/editor/DrydockBlueprintEditEngine.php
--- a/src/applications/drydock/editor/DrydockBlueprintEditEngine.php
+++ b/src/applications/drydock/editor/DrydockBlueprintEditEngine.php
@@ -153,7 +153,7 @@
id(new PhabricatorTextEditField())
->setKey('type')
->setLabel(pht('Type'))
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setTransactionType(
DrydockBlueprintTypeTransaction::TRANSACTIONTYPE)
->setDescription(pht('When creating a blueprint, set the type.'))
diff --git a/src/applications/maniphest/editor/ManiphestEditEngine.php b/src/applications/maniphest/editor/ManiphestEditEngine.php
--- a/src/applications/maniphest/editor/ManiphestEditEngine.php
+++ b/src/applications/maniphest/editor/ManiphestEditEngine.php
@@ -169,9 +169,7 @@
->setConduitDocumentation($column_documentation)
->setAliases(array('columnPHID', 'columns', 'columnPHIDs'))
->setTransactionType(PhabricatorTransactions::TYPE_COLUMNS)
- ->setIsReorderable(false)
- ->setIsDefaultable(false)
- ->setIsLockable(false)
+ ->setIsFormField(false)
->setCommentActionLabel(pht('Move on Workboard'))
->setCommentActionOrder(2000)
->setColumnMap($column_map),
@@ -291,7 +289,7 @@
->setConduitDescription(pht('Change the parents of this task.'))
->setConduitTypeDescription(pht('List of parent task PHIDs.'))
->setUseEdgeTransactions(true)
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setTransactionType(PhabricatorTransactions::TYPE_EDGE)
->setMetadataValue('edge:type', $parent_type)
->setValue($parent_phids);
@@ -303,7 +301,7 @@
->setConduitDescription(pht('Change the subtasks of this task.'))
->setConduitTypeDescription(pht('List of subtask PHIDs.'))
->setUseEdgeTransactions(true)
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setTransactionType(PhabricatorTransactions::TYPE_EDGE)
->setMetadataValue('edge:type', $subtask_type)
->setValue($parent_phids);
diff --git a/src/applications/owners/editor/PhabricatorOwnersPackageEditEngine.php b/src/applications/owners/editor/PhabricatorOwnersPackageEditEngine.php
--- a/src/applications/owners/editor/PhabricatorOwnersPackageEditEngine.php
+++ b/src/applications/owners/editor/PhabricatorOwnersPackageEditEngine.php
@@ -159,7 +159,7 @@
->setDescription(pht('Archive or enable the package.'))
->setTransactionType(
PhabricatorOwnersPackageStatusTransaction::TRANSACTIONTYPE)
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setValue($object->getStatus())
->setOptions($object->getStatusNameMap()),
id(new PhabricatorCheckboxesEditField())
@@ -176,7 +176,7 @@
id(new PhabricatorConduitEditField())
->setKey('paths.set')
->setLabel(pht('Paths'))
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setTransactionType(
PhabricatorOwnersPackagePathsTransaction::TRANSACTIONTYPE)
->setConduitDescription(
diff --git a/src/applications/paste/editor/PhabricatorPasteEditEngine.php b/src/applications/paste/editor/PhabricatorPasteEditEngine.php
--- a/src/applications/paste/editor/PhabricatorPasteEditEngine.php
+++ b/src/applications/paste/editor/PhabricatorPasteEditEngine.php
@@ -104,7 +104,7 @@
->setLabel(pht('Status'))
->setTransactionType(
PhabricatorPasteStatusTransaction::TRANSACTIONTYPE)
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setOptions(PhabricatorPaste::getStatusNameMap())
->setDescription(pht('Active or archived status.'))
->setConduitDescription(pht('Active or archive the paste.'))
diff --git a/src/applications/people/editor/PhabricatorUserEditEngine.php b/src/applications/people/editor/PhabricatorUserEditEngine.php
--- a/src/applications/people/editor/PhabricatorUserEditEngine.php
+++ b/src/applications/people/editor/PhabricatorUserEditEngine.php
@@ -71,7 +71,7 @@
->setLabel(pht('Disabled'))
->setDescription(pht('Disable the user.'))
->setTransactionType(PhabricatorUserDisableTransaction::TRANSACTIONTYPE)
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setConduitDescription(pht('Disable or enable the user.'))
->setConduitTypeDescription(pht('True to disable the user.'))
->setValue($object->getIsDisabled()),
diff --git a/src/applications/phame/editor/PhameBlogEditEngine.php b/src/applications/phame/editor/PhameBlogEditEngine.php
--- a/src/applications/phame/editor/PhameBlogEditEngine.php
+++ b/src/applications/phame/editor/PhameBlogEditEngine.php
@@ -126,7 +126,7 @@
->setKey('status')
->setLabel(pht('Status'))
->setTransactionType(PhameBlogStatusTransaction::TRANSACTIONTYPE)
- ->setIsConduitOnly(true)
+ ->setIsFormField(false)
->setOptions(PhameBlog::getStatusNameMap())
->setDescription(pht('Active or archived status.'))
->setConduitDescription(pht('Active or archive the blog.'))
diff --git a/src/applications/project/engine/PhabricatorProjectEditEngine.php b/src/applications/project/engine/PhabricatorProjectEditEngine.php
--- a/src/applications/project/engine/PhabricatorProjectEditEngine.php
+++ b/src/applications/project/engine/PhabricatorProjectEditEngine.php
@@ -287,13 +287,13 @@
// Show this on the web UI when creating a project, but not when editing
// one. It is always available via Conduit.
- $conduit_only = !$this->getIsCreate();
+ $show_field = (bool)$this->getIsCreate();
$members_field = id(new PhabricatorUsersEditField())
->setKey('members')
->setAliases(array('memberPHIDs'))
->setLabel(pht('Initial Members'))
- ->setIsConduitOnly($conduit_only)
+ ->setIsFormField($show_field)
->setUseEdgeTransactions(true)
->setTransactionType(PhabricatorTransactions::TYPE_EDGE)
->setMetadataValue(
diff --git a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationDefaultsController.php b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationDefaultsController.php
--- a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationDefaultsController.php
+++ b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationDefaultsController.php
@@ -30,6 +30,11 @@
$fields = $engine->getFieldsForConfig($config);
foreach ($fields as $key => $field) {
+ if (!$field->getIsFormField()) {
+ unset($fields[$key]);
+ continue;
+ }
+
if (!$field->getIsDefaultable()) {
unset($fields[$key]);
continue;
diff --git a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationLockController.php b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationLockController.php
--- a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationLockController.php
+++ b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationLockController.php
@@ -79,6 +79,10 @@
);
foreach ($fields as $field) {
+ if (!$field->getIsFormField()) {
+ continue;
+ }
+
if (!$field->getIsLockable()) {
continue;
}
diff --git a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationReorderController.php b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationReorderController.php
--- a/src/applications/transactions/controller/PhabricatorEditEngineConfigurationReorderController.php
+++ b/src/applications/transactions/controller/PhabricatorEditEngineConfigurationReorderController.php
@@ -62,6 +62,10 @@
$key_order = array();
foreach ($fields as $field) {
+ if (!$field->getIsFormField()) {
+ continue;
+ }
+
if (!$field->getIsReorderable()) {
continue;
}
diff --git a/src/applications/transactions/editengine/PhabricatorEditEngine.php b/src/applications/transactions/editengine/PhabricatorEditEngine.php
--- a/src/applications/transactions/editengine/PhabricatorEditEngine.php
+++ b/src/applications/transactions/editengine/PhabricatorEditEngine.php
@@ -1289,6 +1289,10 @@
}
foreach ($fields as $field) {
+ if (!$field->getIsFormField()) {
+ continue;
+ }
+
$field->appendToForm($form);
}
diff --git a/src/applications/transactions/editfield/PhabricatorEditField.php b/src/applications/transactions/editfield/PhabricatorEditField.php
--- a/src/applications/transactions/editfield/PhabricatorEditField.php
+++ b/src/applications/transactions/editfield/PhabricatorEditField.php
@@ -44,7 +44,7 @@
private $isDefaultable = true;
private $isLockable = true;
private $isCopyable = false;
- private $isConduitOnly = false;
+ private $isFormField = true;
private $conduitEditTypes;
private $bulkEditTypes;
@@ -139,13 +139,13 @@
return $this->isReorderable;
}
- public function setIsConduitOnly($is_conduit_only) {
- $this->isConduitOnly = $is_conduit_only;
+ public function setIsFormField($is_form_field) {
+ $this->isFormField = $is_form_field;
return $this;
}
- public function getIsConduitOnly() {
- return $this->isConduitOnly;
+ public function getIsFormField() {
+ return $this->isFormField;
}
public function setDescription($description) {
@@ -336,7 +336,7 @@
}
protected function buildControl() {
- if ($this->getIsConduitOnly()) {
+ if (!$this->getIsFormField()) {
return null;
}
@@ -637,7 +637,7 @@
}
final public function getHTTPParameterType() {
- if ($this->getIsConduitOnly()) {
+ if (!$this->getIsFormField()) {
return null;
}
@@ -840,7 +840,7 @@
}
public function shouldGenerateTransactionsFromSubmit() {
- if ($this->getIsConduitOnly()) {
+ if (!$this->getIsFormField()) {
return false;
}
@@ -853,7 +853,7 @@
}
public function shouldReadValueFromRequest() {
- if ($this->getIsConduitOnly()) {
+ if (!$this->getIsFormField()) {
return false;
}
@@ -869,7 +869,7 @@
}
public function shouldReadValueFromSubmit() {
- if ($this->getIsConduitOnly()) {
+ if (!$this->getIsFormField()) {
return false;
}
@@ -885,7 +885,7 @@
}
public function shouldGenerateTransactionsFromComment() {
- if ($this->getIsConduitOnly()) {
+ if (!$this->getCommentActionLabel()) {
return false;
}
diff --git a/src/applications/transactions/engineextension/PhabricatorCommentEditEngineExtension.php b/src/applications/transactions/engineextension/PhabricatorCommentEditEngineExtension.php
--- a/src/applications/transactions/engineextension/PhabricatorCommentEditEngineExtension.php
+++ b/src/applications/transactions/engineextension/PhabricatorCommentEditEngineExtension.php
@@ -57,10 +57,7 @@
->setBulkEditLabel(pht('Add comment'))
->setBulkEditGroupKey('comments')
->setAliases(array('comments'))
- ->setIsHidden(true)
- ->setIsReorderable(false)
- ->setIsDefaultable(false)
- ->setIsLockable(false)
+ ->setIsFormField(false)
->setCanApplyWithoutEditCapability($is_interact)
->setTransactionType($comment_type)
->setConduitDescription(pht('Make comments.'))
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
@@ -36,20 +36,20 @@
$subtype_field = id(new PhabricatorSelectEditField())
->setKey(self::EDITKEY)
->setLabel(pht('Subtype'))
- ->setIsConduitOnly(true)
- ->setIsHidden(true)
- ->setIsReorderable(false)
- ->setIsDefaultable(false)
- ->setIsLockable(false)
+ ->setIsFormField(false)
->setTransactionType($subtype_type)
->setConduitDescription(pht('Change the object subtype.'))
->setConduitTypeDescription(pht('New object subtype key.'))
->setValue($object->getEditEngineSubtype())
->setOptions($options);
- // If subtypes are configured, enable changing them from the bulk editor.
+ // If subtypes are configured, enable changing them from the bulk editor
+ // and comment action stack.
if (count($map) > 1) {
- $subtype_field->setBulkEditLabel(pht('Change subtype to'));
+ $subtype_field
+ ->setBulkEditLabel(pht('Change subtype to'))
+ ->setCommentActionLabel(pht('Change Subtype'))
+ ->setCommentActionOrder(3000);
}
return array(
diff --git a/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php b/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php
--- a/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php
+++ b/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php
@@ -139,9 +139,14 @@
$values = $this->getProperty('defaults', array());
foreach ($fields as $key => $field) {
+ if (!$field->getIsFormField()) {
+ continue;
+ }
+
if (!$field->getIsDefaultable()) {
continue;
}
+
if ($is_new) {
if (array_key_exists($key, $values)) {
$field->readDefaultValueFromConfiguration($values[$key]);
diff --git a/src/infrastructure/customfield/editor/PhabricatorCustomFieldEditField.php b/src/infrastructure/customfield/editor/PhabricatorCustomFieldEditField.php
--- a/src/infrastructure/customfield/editor/PhabricatorCustomFieldEditField.php
+++ b/src/infrastructure/customfield/editor/PhabricatorCustomFieldEditField.php
@@ -59,7 +59,7 @@
}
protected function buildControl() {
- if ($this->getIsConduitOnly()) {
+ if (!$this->getIsFormField()) {
return null;
}
diff --git a/src/infrastructure/customfield/field/PhabricatorCustomField.php b/src/infrastructure/customfield/field/PhabricatorCustomField.php
--- a/src/infrastructure/customfield/field/PhabricatorCustomField.php
+++ b/src/infrastructure/customfield/field/PhabricatorCustomField.php
@@ -1145,10 +1145,10 @@
return $this->proxy->newStandardEditField();
}
- if (!$this->shouldAppearInEditView()) {
- $conduit_only = true;
+ if ($this->shouldAppearInEditView()) {
+ $form_field = true;
} else {
- $conduit_only = false;
+ $form_field = false;
}
$bulk_label = $this->getBulkEditLabel();
@@ -1160,7 +1160,7 @@
->setBulkEditLabel($bulk_label)
->setDescription($this->getFieldDescription())
->setTransactionType($this->getApplicationTransactionType())
- ->setIsConduitOnly($conduit_only)
+ ->setIsFormField($form_field)
->setValue($this->getNewValueForApplicationTransactions());
}

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 9:50 AM (17 h, 48 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6921043
Default Alt Text
D19842.diff (28 KB)

Event Timeline