Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14316025
D20961.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
D20961.diff
View Options
diff --git a/src/applications/audit/editor/PhabricatorAuditEditor.php b/src/applications/audit/editor/PhabricatorAuditEditor.php
--- a/src/applications/audit/editor/PhabricatorAuditEditor.php
+++ b/src/applications/audit/editor/PhabricatorAuditEditor.php
@@ -405,6 +405,31 @@
$phid_map[] = $reverted_phids;
}
+ // See T13463. Copy "related task" edges from the associated revision, if
+ // one exists.
+
+ $revision = DiffusionCommitRevisionQuery::loadRevisionForCommit(
+ $actor,
+ $object);
+ if ($revision) {
+ $task_phids = PhabricatorEdgeQuery::loadDestinationPHIDs(
+ $revision->getPHID(),
+ DifferentialRevisionHasTaskEdgeType::EDGECONST);
+ $task_phids = array_fuse($task_phids);
+
+ if ($task_phids) {
+ $related_edge = DiffusionCommitHasTaskEdgeType::EDGECONST;
+ $result[] = id(new PhabricatorAuditTransaction())
+ ->setTransactionType(PhabricatorTransactions::TYPE_EDGE)
+ ->setMetadataValue('edge:type', $related_edge)
+ ->setNewValue(array('+' => $task_phids));
+ }
+
+ // Mark these objects as unmentionable, since the explicit relationship
+ // is stronger and any mentions are redundant.
+ $phid_map[] = $task_phids;
+ }
+
$phid_map = array_mergev($phid_map);
$this->addUnmentionablePHIDs($phid_map);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 6:46 AM (14 h, 12 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6906527
Default Alt Text
D20961.diff (1 KB)
Attached To
Mode
D20961: When publishing a commit, copy "Related Tasks" from the associated revision (if one exists)
Attached
Detach File
Event Timeline
Log In to Comment