Page MenuHomePhabricator

D20731.id49427.diff
No OneTemporary

D20731.id49427.diff

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
@@ -261,6 +261,7 @@
$parent_type = ManiphestTaskDependedOnByTaskEdgeType::EDGECONST;
$subtask_type = ManiphestTaskDependsOnTaskEdgeType::EDGECONST;
+ $commit_type = ManiphestTaskHasCommitEdgeType::EDGECONST;
$src_phid = $object->getPHID();
if ($src_phid) {
@@ -270,6 +271,7 @@
array(
$parent_type,
$subtask_type,
+ $commit_type,
));
$edge_query->execute();
@@ -280,9 +282,14 @@
$subtask_phids = $edge_query->getDestinationPHIDs(
array($src_phid),
array($subtask_type));
+
+ $commit_phids = $edge_query->getDestinationPHIDs(
+ array($src_phid),
+ array($commit_type));
} else {
$parent_phids = array();
$subtask_phids = array();
+ $commit_phids = array();
}
$fields[] = id(new PhabricatorHandlesEditField())
@@ -307,7 +314,19 @@
->setIsFormField(false)
->setTransactionType(PhabricatorTransactions::TYPE_EDGE)
->setMetadataValue('edge:type', $subtask_type)
- ->setValue($parent_phids);
+ ->setValue($subtask_phids);
+
+ $fields[] = id(new PhabricatorHandlesEditField())
+ ->setKey('commits')
+ ->setLabel(pht('Commits'))
+ ->setDescription(pht('Related commits.'))
+ ->setConduitDescription(pht('Change the related commits for this task.'))
+ ->setConduitTypeDescription(pht('List of related commit PHIDs.'))
+ ->setUseEdgeTransactions(true)
+ ->setIsFormField(false)
+ ->setTransactionType(PhabricatorTransactions::TYPE_EDGE)
+ ->setMetadataValue('edge:type', $commit_type)
+ ->setValue($commit_phids);
return $fields;
}

File Metadata

Mime Type
text/plain
Expires
Tue, May 6, 10:11 AM (3 d, 5 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7388279
Default Alt Text
D20731.id49427.diff (1 KB)

Event Timeline