mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +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:
parent
bec21d80a5
commit
9bab3c25b8
3 changed files with 7 additions and 2 deletions
|
@ -205,7 +205,7 @@ final class PhabricatorProjectProfileController
|
|||
array(
|
||||
PhabricatorProjectStatus::STATUS_ACTIVE,
|
||||
))
|
||||
->setOrder('newest')
|
||||
->setOrderVector(array('milestoneNumber', 'id'))
|
||||
->execute();
|
||||
if (!$milestones) {
|
||||
return null;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -170,6 +170,11 @@ final class PhabricatorProjectQuery
|
|||
'type' => 'string',
|
||||
'unique' => true,
|
||||
),
|
||||
'milestoneNumber' => array(
|
||||
'table' => $this->getPrimaryTableAlias(),
|
||||
'column' => 'milestoneNumber',
|
||||
'type' => 'int',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue