Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15466041
D20731.id49425.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D20731.id49425.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
@@ -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
Details
Attached
Mime Type
text/plain
Expires
Apr 4 2025, 12:58 AM (5 w, 9 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7388279
Default Alt Text
D20731.id49425.diff (1 KB)
Attached To
Mode
D20731: Expose "commits.add|set|remove" on "maniphest.edit" API calls
Attached
Detach File
Event Timeline
Log In to Comment