Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F105302204
migrate-maniphest-dependencies.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Mar 16, 03:50
Size
652 B
Mime Type
text/x-php
Expires
Tue, Mar 18, 03:50 (2 d)
Engine
blob
Format
Raw Data
Handle
24959715
Attached To
rPH Phabricator
migrate-maniphest-dependencies.php
View Options
<?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
(
PhabricatorPHIDConstants
::
PHID_TYPE_TASK
);
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
"
;
Event Timeline
Log In to Comment