Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F94236281
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, Dec 5, 00:23
Size
636 B
Mime Type
text/x-php
Expires
Sat, Dec 7, 00:23 (1 d, 4 h)
Engine
blob
Format
Raw Data
Handle
22719491
Attached To
rPH Phabricator
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
"
;
Event Timeline
Log In to Comment