mirror of
https://we.phorge.it/source/phorge.git
synced 2025-03-29 12:38:12 +01:00
Minor Tasks fixes
Summary: - We need to sort Projects explicitly because we go through task-by-task which ruins the ordering. My test case was just small enough not to notice. - Push "No Project" to the bottom explicitly. - Simplify/fix the pull of "Unassigned" to the top. - Fix a return type. Test Plan: Tested the various sorting cases against a larger test data set. Reviewers: btrahan Reviewed By: btrahan CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1988
This commit is contained in:
parent
c92e37c1b1
commit
e2a457873e
2 changed files with 15 additions and 7 deletions
|
@ -753,7 +753,7 @@ final class ManiphestReportController extends ManiphestController {
|
|||
}
|
||||
|
||||
if ($oldest === null) {
|
||||
return '-';
|
||||
return array('-', 0);
|
||||
}
|
||||
|
||||
$oldest = $tasks[$oldest];
|
||||
|
|
|
@ -452,14 +452,14 @@ final class ManiphestTaskListController extends ManiphestController {
|
|||
$out['Unassigned'] = $tasks;
|
||||
}
|
||||
}
|
||||
if (isset($out['Unassigned'])) {
|
||||
// If any tasks are unassigned, move them to the front of the list.
|
||||
$data = array('Unassigned' => $out['Unassigned']) + $out;
|
||||
} else {
|
||||
$data = $out;
|
||||
}
|
||||
|
||||
$data = $out;
|
||||
ksort($data);
|
||||
|
||||
// Move "Unassigned" to the top of the list.
|
||||
if (isset($data['Unassigned'])) {
|
||||
$data = array('Unassigned' => $out['Unassigned']) + $out;
|
||||
}
|
||||
break;
|
||||
case 'project':
|
||||
$grouped = array();
|
||||
|
@ -480,6 +480,14 @@ final class ManiphestTaskListController extends ManiphestController {
|
|||
}
|
||||
}
|
||||
$data = $grouped;
|
||||
ksort($data);
|
||||
|
||||
// Move "No Project" to the end of the list.
|
||||
if (isset($data['No Project'])) {
|
||||
$noproject = $data['No Project'];
|
||||
unset($data['No Project']);
|
||||
$data += array('No Project' => $noproject);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$data = array(
|
||||
|
|
Loading…
Add table
Reference in a new issue