mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 04:50:55 +01:00
Allow Maniphest task status to be changed on the "Edit Task" interface
Summary: We omit a 'status' dropdown when creating a new task since it's silly to create a non-open task and would just clutter the interface, but there's no reason not to allow status to be edited on the "Edit" interface. Test Plan: Created a new task (no status dropdown). Edited a task, including changing the task status. Reviewed By: jungejason Reviewers: toulouse, jungejason, tuomaspelkonen, aran CC: aran, jungejason Differential Revision: 720
This commit is contained in:
parent
26bca41828
commit
eacd0f5370
1 changed files with 20 additions and 1 deletions
|
@ -76,6 +76,7 @@ class ManiphestTaskEditController extends ManiphestController {
|
|||
|
||||
$new_title = $request->getStr('title');
|
||||
$new_desc = $request->getStr('description');
|
||||
$new_status = $request->getStr('status');
|
||||
|
||||
if ($task->getID()) {
|
||||
if ($new_title != $task->getTitle()) {
|
||||
|
@ -84,6 +85,9 @@ class ManiphestTaskEditController extends ManiphestController {
|
|||
if ($new_desc != $task->getDescription()) {
|
||||
$changes[ManiphestTransactionType::TYPE_DESCRIPTION] = $new_desc;
|
||||
}
|
||||
if ($new_status != $task->getStatus()) {
|
||||
$changes[ManiphestTransactionType::TYPE_STATUS] = $new_status;
|
||||
}
|
||||
} else {
|
||||
$task->setTitle($new_title);
|
||||
$task->setDescription($new_desc);
|
||||
|
@ -225,7 +229,22 @@ class ManiphestTaskEditController extends ManiphestController {
|
|||
->setName('title')
|
||||
->setError($e_title)
|
||||
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_SHORT)
|
||||
->setValue($task->getTitle()))
|
||||
->setValue($task->getTitle()));
|
||||
|
||||
if ($task->getID()) {
|
||||
// Only show this in "edit" mode, not "create" mode, since creating a
|
||||
// non-open task is kind of silly and it would just clutter up the
|
||||
// "create" interface.
|
||||
$form
|
||||
->appendChild(
|
||||
id(new AphrontFormSelectControl())
|
||||
->setLabel('Status')
|
||||
->setName('status')
|
||||
->setValue($task->getStatus())
|
||||
->setOptions(ManiphestTaskStatus::getTaskStatusMap()));
|
||||
}
|
||||
|
||||
$form
|
||||
->appendChild(
|
||||
id(new AphrontFormTokenizerControl())
|
||||
->setLabel('Assigned To')
|
||||
|
|
Loading…
Reference in a new issue