mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-31 00:48:21 +01:00
Remove "Close Task" button
Summary: Fixes T5134 Test Plan: Went to a task, closed it. Felt satisfied. Reviewers: chad, btrahan Reviewed By: btrahan Subscribers: epriestley, Korvin Maniphest Tasks: T4657, T5134 Differential Revision: https://secure.phabricator.com/D9221
This commit is contained in:
parent
fbbb43c472
commit
d2ead465f3
2 changed files with 5 additions and 27 deletions
|
@ -205,20 +205,6 @@ final class ManiphestTaskDetailController extends ManiphestController {
|
|||
$draft_text = null;
|
||||
}
|
||||
|
||||
$submit_control = id(new PHUIFormMultiSubmitControl());
|
||||
if (!$task->isClosed()) {
|
||||
$close_image = id(new PHUIIconView())
|
||||
->setIconFont('fa-check-square-o');
|
||||
$submit_control->addButtonView(
|
||||
id(new PHUIButtonView())
|
||||
->setColor(PHUIButtonView::GREY)
|
||||
->setIcon($close_image)
|
||||
->setText(pht('Close Task'))
|
||||
->setName('scuttle')
|
||||
->addSigil('alternate-submit-button'));
|
||||
}
|
||||
$submit_control->addSubmitButton(pht('Submit'));
|
||||
|
||||
$comment_form = new AphrontFormView();
|
||||
$comment_form
|
||||
->setUser($user)
|
||||
|
@ -284,7 +270,9 @@ final class ManiphestTaskDetailController extends ManiphestController {
|
|||
->setValue($draft_text)
|
||||
->setID('transaction-comments')
|
||||
->setUser($user))
|
||||
->appendChild($submit_control);
|
||||
->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue(pht('Submit')));
|
||||
|
||||
$control_map = array(
|
||||
ManiphestTransaction::TYPE_STATUS => 'resolution',
|
||||
|
|
|
@ -78,17 +78,6 @@ final class ManiphestTransactionSaveController extends ManiphestController {
|
|||
$transactions[] = $transaction;
|
||||
}
|
||||
|
||||
$resolution = $request->getStr('resolution');
|
||||
$did_scuttle = false;
|
||||
if ($action !== ManiphestTransaction::TYPE_STATUS) {
|
||||
if ($request->getStr('scuttle')) {
|
||||
$transactions[] = id(new ManiphestTransaction())
|
||||
->setTransactionType(ManiphestTransaction::TYPE_STATUS)
|
||||
->setNewValue(ManiphestTaskStatus::getDefaultClosedStatus());
|
||||
$did_scuttle = true;
|
||||
$resolution = ManiphestTaskStatus::getDefaultClosedStatus();
|
||||
}
|
||||
}
|
||||
|
||||
// When you interact with a task, we add you to the CC list so you get
|
||||
// further updates, and possibly assign the task to you if you took an
|
||||
|
@ -106,7 +95,8 @@ final class ManiphestTransactionSaveController extends ManiphestController {
|
|||
}
|
||||
}
|
||||
|
||||
if ($did_scuttle || ($action == ManiphestTransaction::TYPE_STATUS)) {
|
||||
if ($action == ManiphestTransaction::TYPE_STATUS) {
|
||||
$resolution = $request->getStr('resolution');
|
||||
if (!$task->getOwnerPHID() &&
|
||||
ManiphestTaskStatus::isClosedStatus($resolution)) {
|
||||
// Closing an unassigned task. Assign the user as the owner of
|
||||
|
|
Loading…
Add table
Reference in a new issue