1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

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

@ -205,7 +205,7 @@ final class PhabricatorProjectProfileController
array(
PhabricatorProjectStatus::STATUS_ACTIVE,
))
->setOrder('newest')
->setOrderVector(array('milestoneNumber', 'id'))
->execute();
if (!$milestones) {
return null;

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();

View file

@ -170,6 +170,11 @@ final class PhabricatorProjectQuery
'type' => 'string',
'unique' => true,
),
'milestoneNumber' => array(
'table' => $this->getPrimaryTableAlias(),
'column' => 'milestoneNumber',
'type' => 'int',
),
);
}