Sort milestones by milestone number, not ID

Summary: Ref T10350. Normally, milestone numbers and IDs have the same order, but they may not if you used the script in T10350 to artificially move a bunch of stuff around.

Test Plan: Milestones now go "1, 2, <thing I artifically moved into position 3>" on local install.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10350

Differential Revision: https://secure.phabricator.com/D15266
This commit is contained in:
epriestley
2016-02-13 08:27:29 -08:00
parent bec21d80a5
commit 9bab3c25b8
3 changed files with 7 additions and 2 deletions

View File

@@ -43,7 +43,7 @@ final class PhabricatorProjectSubprojectsController
->withParentProjectPHIDs(array($project->getPHID()))
->needImages(true)
->withIsMilestone(true)
->setOrder('newest')
->setOrderVector(array('milestoneNumber', 'id'))
->execute();
} else {
$milestones = array();