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(
|
array(
|
||||||
PhabricatorProjectStatus::STATUS_ACTIVE,
|
PhabricatorProjectStatus::STATUS_ACTIVE,
|
||||||
))
|
))
|
||||||
->setOrder('newest')
|
->setOrderVector(array('milestoneNumber', 'id'))
|
||||||
->execute();
|
->execute();
|
||||||
if (!$milestones) {
|
if (!$milestones) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -43,7 +43,7 @@ final class PhabricatorProjectSubprojectsController
|
||||||
->withParentProjectPHIDs(array($project->getPHID()))
|
->withParentProjectPHIDs(array($project->getPHID()))
|
||||||
->needImages(true)
|
->needImages(true)
|
||||||
->withIsMilestone(true)
|
->withIsMilestone(true)
|
||||||
->setOrder('newest')
|
->setOrderVector(array('milestoneNumber', 'id'))
|
||||||
->execute();
|
->execute();
|
||||||
} else {
|
} else {
|
||||||
$milestones = array();
|
$milestones = array();
|
||||||
|
|
|
@ -170,6 +170,11 @@ final class PhabricatorProjectQuery
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'unique' => true,
|
'unique' => true,
|
||||||
),
|
),
|
||||||
|
'milestoneNumber' => array(
|
||||||
|
'table' => $this->getPrimaryTableAlias(),
|
||||||
|
'column' => 'milestoneNumber',
|
||||||
|
'type' => 'int',
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue