@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.

Fix an issue where "Close Revision" did not appear in the UI

Summary:
Ref T2543. When called from the UI to build the dropdown, there's no Editor, since we aren't actually in an edit flow.

This logic worked for actually performing the edits, just not for getting the option into the dropdown.

Test Plan: Used the dropdown to close an "Accepted" revision which I authored.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2543

Differential Revision: https://secure.phabricator.com/D18490

+10 -4
+6 -4
src/applications/differential/xaction/DifferentialRevisionCloseTransaction.php
··· 46 46 } 47 47 48 48 protected function validateAction($object, PhabricatorUser $viewer) { 49 - if ($this->getEditor()->getIsCloseByCommit()) { 50 - // If we're closing a revision because we discovered a commit, we don't 51 - // care what state it was in. 52 - return; 49 + if ($this->hasEditor()) { 50 + if ($this->getEditor()->getIsCloseByCommit()) { 51 + // If we're closing a revision because we discovered a commit, we don't 52 + // care what state it was in. 53 + return; 54 + } 53 55 } 54 56 55 57 if ($object->isClosed()) {
+4
src/applications/transactions/storage/PhabricatorModularTransactionType.php
··· 134 134 return $this->editor; 135 135 } 136 136 137 + final protected function hasEditor() { 138 + return (bool)$this->editor; 139 + } 140 + 137 141 final protected function getAuthorPHID() { 138 142 return $this->getStorage()->getAuthorPHID(); 139 143 }