Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/editor/ManiphestTransactionEditor.php
Show First 20 Lines • Show All 365 Lines • ▼ Show 20 Lines | if ($unblock_xaction !== null) { | ||||
->needSubscriberPHIDs(true) | ->needSubscriberPHIDs(true) | ||||
->needProjectPHIDs(true) | ->needProjectPHIDs(true) | ||||
->execute(); | ->execute(); | ||||
$old = $unblock_xaction->getOldValue(); | $old = $unblock_xaction->getOldValue(); | ||||
$new = $unblock_xaction->getNewValue(); | $new = $unblock_xaction->getNewValue(); | ||||
foreach ($blocked_tasks as $blocked_task) { | foreach ($blocked_tasks as $blocked_task) { | ||||
$unblock_xactions = array(); | $parent_xaction = id(new ManiphestTransaction()) | ||||
$unblock_xactions[] = id(new ManiphestTransaction()) | |||||
->setTransactionType(ManiphestTransaction::TYPE_UNBLOCK) | ->setTransactionType(ManiphestTransaction::TYPE_UNBLOCK) | ||||
->setOldValue(array($object->getPHID() => $old)) | ->setOldValue(array($object->getPHID() => $old)) | ||||
->setNewValue(array($object->getPHID() => $new)); | ->setNewValue(array($object->getPHID() => $new)); | ||||
if ($this->getIsNewObject()) { | |||||
$parent_xaction->setMetadataValue('blocker.new', true); | |||||
} | |||||
id(new ManiphestTransactionEditor()) | id(new ManiphestTransactionEditor()) | ||||
->setActor($this->getActor()) | ->setActor($this->getActor()) | ||||
->setActingAsPHID($this->getActingAsPHID()) | ->setActingAsPHID($this->getActingAsPHID()) | ||||
->setContentSource($this->getContentSource()) | ->setContentSource($this->getContentSource()) | ||||
->setContinueOnNoEffect(true) | ->setContinueOnNoEffect(true) | ||||
->setContinueOnMissingFields(true) | ->setContinueOnMissingFields(true) | ||||
->applyTransactions($blocked_task, $unblock_xactions); | ->applyTransactions($blocked_task, array($parent_xaction)); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
return $xactions; | return $xactions; | ||||
} | } | ||||
protected function shouldSendMail( | protected function shouldSendMail( | ||||
▲ Show 20 Lines • Show All 558 Lines • Show Last 20 Lines |