mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Route lipsum writes through the new Maniphest transaction code
Summary: Ref T2217. Ship these through the new stuff. Test Plan: See screenshot. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2217 Differential Revision: https://secure.phabricator.com/D7087
This commit is contained in:
parent
11c7eee783
commit
2a78767a4a
1 changed files with 9 additions and 5 deletions
|
@ -10,13 +10,14 @@ final class PhabricatorManiphestTaskTestDataGenerator
|
|||
$task = id(new ManiphestTask())
|
||||
->setSubPriority($this->generateTaskSubPriority())
|
||||
->setAuthorPHID($authorPHID)
|
||||
->setTitle($this->generateTitle());
|
||||
->setTitle($this->generateTitle())
|
||||
->setStatus(ManiphestTaskStatus::STATUS_OPEN);
|
||||
|
||||
$content_source = PhabricatorContentSource::newForSource(
|
||||
PhabricatorContentSource::SOURCE_UNKNOWN,
|
||||
array());
|
||||
$template = id(new ManiphestTransaction())
|
||||
->setAuthorPHID($authorPHID)
|
||||
->setContentSource($content_source);
|
||||
|
||||
$template = new ManiphestTransactionPro();
|
||||
// Accumulate Transactions
|
||||
$changes = array();
|
||||
$changes[ManiphestTransactionType::TYPE_TITLE] =
|
||||
|
@ -42,8 +43,11 @@ final class PhabricatorManiphestTaskTestDataGenerator
|
|||
}
|
||||
|
||||
// Apply Transactions
|
||||
$editor = id(new ManiphestTransactionEditor())
|
||||
$editor = id(new ManiphestTransactionEditorPro())
|
||||
->setActor($author)
|
||||
->setContentSource($content_source)
|
||||
->setContinueOnNoEffect(true)
|
||||
->setContinueOnMissingFields(true)
|
||||
->applyTransactions($task, $transactions);
|
||||
return $task->save();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue