Put subprojects and milestones back into the Project UI
Summary: Ref T10010. Restores subprojects and milestones to the UI with a more modern style and more warnings.
Test Plan:
{F1085207}
{F1085208}
Reviewers: chad
Reviewed By: chad
Maniphest Tasks: T10010
Differential Revision: https://secure.phabricator.com/D15152
This commit is contained in:
@@ -61,6 +61,15 @@ final class PhabricatorProjectsMembershipIndexEngineExtension
|
||||
|
||||
$conn_w = $project->establishConnection('w');
|
||||
|
||||
$any_milestone = queryfx_one(
|
||||
$conn_w,
|
||||
'SELECT id FROM %T
|
||||
WHERE parentProjectPHID = %s AND milestoneNumber IS NOT NULL
|
||||
LIMIT 1',
|
||||
$project->getTableName(),
|
||||
$project_phid);
|
||||
$has_milestones = (bool)$any_milestone;
|
||||
|
||||
$project->openTransaction();
|
||||
|
||||
// Delete any existing materialized member edges.
|
||||
@@ -92,6 +101,14 @@ final class PhabricatorProjectsMembershipIndexEngineExtension
|
||||
(int)$has_subprojects,
|
||||
$project->getID());
|
||||
|
||||
// Update the hasMilestones flag.
|
||||
queryfx(
|
||||
$conn_w,
|
||||
'UPDATE %T SET hasMilestones = %d WHERE id = %d',
|
||||
$project->getTableName(),
|
||||
(int)$has_milestones,
|
||||
$project->getID());
|
||||
|
||||
$project->saveTransaction();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user