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

In Differential, prevent "Accept" and "Reject" from "Plan Changes + Draft"

Summary:
Ref T13130. See PHI483. Currently, "Plan Changes + Draft" uses rules like "Plan Changes", not rules like "Draft", and allows "Accept".

This isn't consistent with how "Draft" and "Accept" work in other cases. Make "Plan Changes + Draft" more like "Draft" for consistency.

Also fix a string that didn't have a natural English version.

Test Plan:
- Added a failing build plan.
- Created a revision.
- Loaded the revision before builds completed, saw a nicer piece of text about "waiting for builds" instead of "waiting for 2 build(s)".
- Builds failed, which automatically demoted the reivsion to "Changes Planned + Draft".
- As the author and as a reviewer, verified all the actions available to me made sense (particularly, no "Accept").
- Abandoned the revision to test "Abandoned + Draft".
- As the author and as a reviewer, verified all the actions available to me made sense.
- Reclaimed the revision, then used "Request Review" to send it to "Needs Review". Verified that actions made sense and, e.g., reviewers could now "Accept" normally.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13130

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

+10 -2
+1 -1
src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php
··· 162 162 'closed. Only open revisions can be accepted.')); 163 163 } 164 164 165 - if ($object->isDraft()) { 165 + if ($object->isDraft() || !$object->getShouldBroadcast()) { 166 166 throw new Exception( 167 167 pht('You can not accept a draft revision.')); 168 168 }
+1 -1
src/applications/differential/xaction/DifferentialRevisionRejectTransaction.php
··· 73 73 'not own.')); 74 74 } 75 75 76 - if ($object->isDraft()) { 76 + if ($object->isDraft() || !$object->getShouldBroadcast()) { 77 77 throw new Exception( 78 78 pht('You can not request changes to a draft revision.')); 79 79 }
+8
src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php
··· 1659 1659 'you can no longer see were discarded.', 1660 1660 ), 1661 1661 1662 + 'This draft revision will be sent for review once %s '. 1663 + 'build(s) pass: %s.' => array( 1664 + 'This draft revision will be sent for review once this build '. 1665 + 'passes: %2$s.', 1666 + 'This draft revision will be sent for review once these builds '. 1667 + 'pass: %2$s.', 1668 + ), 1669 + 1662 1670 ); 1663 1671 } 1664 1672