@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+5 -27
+3 -15
src/applications/maniphest/controller/ManiphestTaskDetailController.php
··· 205 205 $draft_text = null; 206 206 } 207 207 208 - $submit_control = id(new PHUIFormMultiSubmitControl()); 209 - if (!$task->isClosed()) { 210 - $close_image = id(new PHUIIconView()) 211 - ->setIconFont('fa-check-square-o'); 212 - $submit_control->addButtonView( 213 - id(new PHUIButtonView()) 214 - ->setColor(PHUIButtonView::GREY) 215 - ->setIcon($close_image) 216 - ->setText(pht('Close Task')) 217 - ->setName('scuttle') 218 - ->addSigil('alternate-submit-button')); 219 - } 220 - $submit_control->addSubmitButton(pht('Submit')); 221 - 222 208 $comment_form = new AphrontFormView(); 223 209 $comment_form 224 210 ->setUser($user) ··· 284 270 ->setValue($draft_text) 285 271 ->setID('transaction-comments') 286 272 ->setUser($user)) 287 - ->appendChild($submit_control); 273 + ->appendChild( 274 + id(new AphrontFormSubmitControl()) 275 + ->setValue(pht('Submit'))); 288 276 289 277 $control_map = array( 290 278 ManiphestTransaction::TYPE_STATUS => 'resolution',
+2 -12
src/applications/maniphest/controller/ManiphestTransactionSaveController.php
··· 78 78 $transactions[] = $transaction; 79 79 } 80 80 81 - $resolution = $request->getStr('resolution'); 82 - $did_scuttle = false; 83 - if ($action !== ManiphestTransaction::TYPE_STATUS) { 84 - if ($request->getStr('scuttle')) { 85 - $transactions[] = id(new ManiphestTransaction()) 86 - ->setTransactionType(ManiphestTransaction::TYPE_STATUS) 87 - ->setNewValue(ManiphestTaskStatus::getDefaultClosedStatus()); 88 - $did_scuttle = true; 89 - $resolution = ManiphestTaskStatus::getDefaultClosedStatus(); 90 - } 91 - } 92 81 93 82 // When you interact with a task, we add you to the CC list so you get 94 83 // further updates, and possibly assign the task to you if you took an ··· 106 95 } 107 96 } 108 97 109 - if ($did_scuttle || ($action == ManiphestTransaction::TYPE_STATUS)) { 98 + if ($action == ManiphestTransaction::TYPE_STATUS) { 99 + $resolution = $request->getStr('resolution'); 110 100 if (!$task->getOwnerPHID() && 111 101 ManiphestTaskStatus::isClosedStatus($resolution)) { 112 102 // Closing an unassigned task. Assign the user as the owner of