mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Restrict marking task duplicate to "merge duplicates" workflow
Summary: Fixes T4819, remove status "duplicate" from dropdown in edit task unless task is already in duplicate status Test Plan: Edit task, not in duplicate status, verify dropdown does not have "duplicate" option. Edit task already in "duplicate" status, verify that dropdown shows "duplicate" status option. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T4819 Differential Revision: https://secure.phabricator.com/D8902
This commit is contained in:
parent
f32971cf81
commit
1d5731b1ae
1 changed files with 9 additions and 1 deletions
|
@ -569,13 +569,21 @@ final class ManiphestTaskEditController extends ManiphestController {
|
|||
->setValue($task->getTitle()));
|
||||
|
||||
if ($can_edit_status) {
|
||||
// See T4819.
|
||||
$status_map = ManiphestTaskStatus::getTaskStatusMap();
|
||||
$dup_status = ManiphestTaskStatus::getDuplicateStatus();
|
||||
|
||||
if ($task->getStatus() != $dup_status) {
|
||||
unset($status_map[$dup_status]);
|
||||
}
|
||||
|
||||
$form
|
||||
->appendChild(
|
||||
id(new AphrontFormSelectControl())
|
||||
->setLabel(pht('Status'))
|
||||
->setName('status')
|
||||
->setValue($task->getStatus())
|
||||
->setOptions(ManiphestTaskStatus::getTaskStatusMap()));
|
||||
->setOptions($status_map));
|
||||
}
|
||||
|
||||
$policies = id(new PhabricatorPolicyQuery())
|
||||
|
|
Loading…
Reference in a new issue