Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F949884
migrate-maniphest-dependencies.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
636 B
Referenced Files
None
Subscribers
None
migrate-maniphest-dependencies.php
View Options
<?php
echo
pht
(
'Migrating task dependencies to edges...'
).
"
\n
"
;
$table
=
new
ManiphestTask
();
$table
->
openTransaction
();
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$task
)
{
$id
=
$task
->
getID
();
echo
pht
(
'Task %d: '
,
$id
);
$deps
=
$task
->
getAttachedPHIDs
(
ManiphestTaskPHIDType
::
TYPECONST
);
if
(!
$deps
)
{
echo
"-
\n
"
;
continue
;
}
$editor
=
new
PhabricatorEdgeEditor
();
foreach
(
$deps
as
$dep
)
{
$editor
->
addEdge
(
$task
->
getPHID
(),
ManiphestTaskDependsOnTaskEdgeType
::
EDGECONST
,
$dep
);
}
$editor
->
save
();
echo
pht
(
'OKAY'
).
"
\n
"
;
}
$table
->
saveTransaction
();
echo
pht
(
'Done.'
).
"
\n
"
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Jun 17, 1:49 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
223964
Default Alt Text
migrate-maniphest-dependencies.php (636 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment