Page MenuHomePhabricator

D20961.diff
No OneTemporary

D20961.diff

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

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)

Event Timeline