Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F113157244
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
Thu, May 15, 15:45
Size
652 B
Mime Type
text/x-php
Expires
Sat, May 17, 15:45 (2 d)
Engine
blob
Format
Raw Data
Handle
26167893
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