mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
17ee71d896
Summary: Ref T2715. Switch Maniphest to the new stuff. Test Plan: Used `phid.query`; `phid.lookup` to load objects. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2715 Differential Revision: https://secure.phabricator.com/D6516
30 lines
644 B
PHP
30 lines
644 B
PHP
<?php
|
|
|
|
echo "Migrating task dependencies to edges...\n";
|
|
$table = new ManiphestTask();
|
|
$table->openTransaction();
|
|
|
|
foreach (new LiskMigrationIterator($table) as $task) {
|
|
$id = $task->getID();
|
|
echo "Task {$id}: ";
|
|
|
|
$deps = $task->getAttachedPHIDs(ManiphestPHIDTypeTask::TYPECONST);
|
|
if (!$deps) {
|
|
echo "-\n";
|
|
continue;
|
|
}
|
|
|
|
$editor = new PhabricatorEdgeEditor();
|
|
$editor->setSuppressEvents(true);
|
|
foreach ($deps as $dep) {
|
|
$editor->addEdge(
|
|
$task->getPHID(),
|
|
PhabricatorEdgeConfig::TYPE_TASK_DEPENDS_ON_TASK,
|
|
$dep);
|
|
}
|
|
$editor->save();
|
|
echo "OKAY\n";
|
|
}
|
|
|
|
$table->saveTransaction();
|
|
echo "Done.\n";
|