Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15465550
D18456.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D18456.id.diff
View Options
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
@@ -251,6 +251,56 @@
id(new PHUIRemarkupPreviewPanel())
->setHeader(pht('Description Preview')));
+ $parent_type = ManiphestTaskDependedOnByTaskEdgeType::EDGECONST;
+ $subtask_type = ManiphestTaskDependsOnTaskEdgeType::EDGECONST;
+
+ $src_phid = $object->getPHID();
+ if ($src_phid) {
+ $edge_query = id(new PhabricatorEdgeQuery())
+ ->withSourcePHIDs(array($src_phid))
+ ->withEdgeTypes(
+ array(
+ $parent_type,
+ $subtask_type,
+ ));
+ $edge_query->execute();
+
+ $parent_phids = $edge_query->getDestinationPHIDs(
+ array($src_phid),
+ array($parent_type));
+
+ $subtask_phids = $edge_query->getDestinationPHIDs(
+ array($src_phid),
+ array($subtask_type));
+ } else {
+ $parent_phids = array();
+ $subtask_phids = array();
+ }
+
+ $fields[] = id(new PhabricatorHandlesEditField())
+ ->setKey('parents')
+ ->setLabel(pht('Parents'))
+ ->setDescription(pht('Parent tasks.'))
+ ->setConduitDescription(pht('Change the parents of this task.'))
+ ->setConduitTypeDescription(pht('List of parent task PHIDs.'))
+ ->setUseEdgeTransactions(true)
+ ->setIsConduitOnly(true)
+ ->setTransactionType(PhabricatorTransactions::TYPE_EDGE)
+ ->setMetadataValue('edge:type', $parent_type)
+ ->setValue($parent_phids);
+
+ $fields[] = id(new PhabricatorHandlesEditField())
+ ->setKey('subtasks')
+ ->setLabel(pht('Subtasks'))
+ ->setDescription(pht('Subtasks.'))
+ ->setConduitDescription(pht('Change the subtasks of this task.'))
+ ->setConduitTypeDescription(pht('List of subtask PHIDs.'))
+ ->setUseEdgeTransactions(true)
+ ->setIsConduitOnly(true)
+ ->setTransactionType(PhabricatorTransactions::TYPE_EDGE)
+ ->setMetadataValue('edge:type', $subtask_type)
+ ->setValue($parent_phids);
+
return $fields;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 3, 8:35 PM (3 d, 19 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7695498
Default Alt Text
D18456.id.diff (2 KB)
Attached To
Mode
D18456: Allow task parents and subtasks to be edited via Conduit API
Attached
Detach File
Event Timeline
Log In to Comment