mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52:41 +01:00
In "Move task to..." workflow, separate visible and hidden columns in the dropdown
Summary: Ref T13368. Currently, both visible and hidden columns are shown in the "Move tasks to..." dropdown on workflows from workboards. When the dropdown contains hidden columns, move them to a separate section to make it clear that they're not likely targets. Test Plan: - Used "Move tasks to project..." targeting a board with no hidden columns. Saw a single ungrouped dropdown. - Used "Move tasks to project..." targeting a board with hidden columns. Saw a dropdown grouped into "Visible" and "Hidden" columns. Maniphest Tasks: T13368 Differential Revision: https://secure.phabricator.com/D20700
This commit is contained in:
parent
6deac35659
commit
0561043a1f
1 changed files with 33 additions and 5 deletions
|
@ -219,12 +219,40 @@ final class PhabricatorProjectColumnBulkMoveController
|
||||||
->setValue($dst_project->getDisplayName()));
|
->setValue($dst_project->getDisplayName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$column_options = array(
|
||||||
|
'visible' => array(),
|
||||||
|
'hidden' => array(),
|
||||||
|
);
|
||||||
|
|
||||||
|
$any_hidden = false;
|
||||||
|
foreach ($dst_columns as $column) {
|
||||||
|
if (!$column->isHidden()) {
|
||||||
|
$group = 'visible';
|
||||||
|
} else {
|
||||||
|
$group = 'hidden';
|
||||||
|
}
|
||||||
|
|
||||||
|
$phid = $column->getPHID();
|
||||||
|
$display_name = $column->getDisplayName();
|
||||||
|
|
||||||
|
$column_options[$group][$phid] = $display_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($column_options['hidden']) {
|
||||||
|
$column_options = array(
|
||||||
|
pht('Visible Columns') => $column_options['visible'],
|
||||||
|
pht('Hidden Columns') => $column_options['hidden'],
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$column_options = $column_options['visible'];
|
||||||
|
}
|
||||||
|
|
||||||
$form->appendControl(
|
$form->appendControl(
|
||||||
id(new AphrontFormSelectControl())
|
id(new AphrontFormSelectControl())
|
||||||
->setName('dstColumnPHID')
|
->setName('dstColumnPHID')
|
||||||
->setLabel(pht('Move to Column'))
|
->setLabel(pht('Move to Column'))
|
||||||
->setValue($dst_column_phid)
|
->setValue($dst_column_phid)
|
||||||
->setOptions(mpull($dst_columns, 'getDisplayName', 'getPHID')));
|
->setOptions($column_options));
|
||||||
|
|
||||||
$submit = pht('Move Tasks');
|
$submit = pht('Move Tasks');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue