Differential D19972 Diff 47710 src/applications/maniphest/relationship/ManiphestTaskRelationship.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/relationship/ManiphestTaskRelationship.php
Show All 25 Lines | abstract class ManiphestTaskRelationship | ||||
} | } | ||||
protected function newMergeFromTransactions(array $tasks) { | protected function newMergeFromTransactions(array $tasks) { | ||||
$xactions = array(); | $xactions = array(); | ||||
$subscriber_phids = $this->loadMergeSubscriberPHIDs($tasks); | $subscriber_phids = $this->loadMergeSubscriberPHIDs($tasks); | ||||
$xactions[] = id(new ManiphestTransaction()) | $xactions[] = id(new ManiphestTransaction()) | ||||
->setTransactionType(PhabricatorTransactions::TYPE_SUBSCRIBERS) | ->setTransactionType(ManiphestTaskMergedFromTransaction::TRANSACTIONTYPE) | ||||
->setNewValue(array('+' => $subscriber_phids)); | ->setNewValue(mpull($tasks, 'getPHID')); | ||||
$xactions[] = id(new ManiphestTransaction()) | $xactions[] = id(new ManiphestTransaction()) | ||||
->setTransactionType( | ->setTransactionType(PhabricatorTransactions::TYPE_SUBSCRIBERS) | ||||
ManiphestTaskMergedFromTransaction::TRANSACTIONTYPE) | ->setNewValue(array('+' => $subscriber_phids)); | ||||
->setNewValue(mpull($tasks, 'getPHID')); | |||||
return $xactions; | return $xactions; | ||||
} | } | ||||
private function loadMergeSubscriberPHIDs(array $tasks) { | private function loadMergeSubscriberPHIDs(array $tasks) { | ||||
$phids = array(); | $phids = array(); | ||||
foreach ($tasks as $task) { | foreach ($tasks as $task) { | ||||
Show All 21 Lines |