Page MenuHomePhabricator

D7654.diff

diff --git a/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php b/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
--- a/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
+++ b/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
@@ -146,6 +146,26 @@
"is accidentally closed or if a developer changes his or her ".
"mind after closing a revision. If it is false, reopening ".
"is not allowed.")),
+ $this->newOption('differential.close-on-accept', 'bool', false)
+ ->setBoolOptions(
+ array(
+ pht('Treat Accepted Revisions as "Closed"'),
+ pht('Treat Accepted Revisions as "Open"'),
+ ))
+ ->setSummary(pht('Allows "Accepted" to act as a closed status.'))
+ ->setDescription(
+ pht(
+ 'Normally, Differential revisions remain on the dashboard when '.
+ 'they are "Accepted", and the author then commits the changes '.
+ 'to "Close" the revision and move it off the dashboard.'.
+ "\n\n".
+ 'If you have an unusual workflow where Differential is used for '.
+ 'post-commit review (normally called "Audit", elsewhere in '.
+ 'Phabricator), you can set this flag to treat the "Accepted" '.
+ 'state as a "Closed" state and end the review workflow early.'.
+ "\n\n".
+ 'This sort of workflow is very unusual. Very few installs should '.
+ 'need to change this option.')),
$this->newOption('differential.days-fresh', 'int', 1)
->setSummary(
pht(
diff --git a/src/applications/differential/constants/DifferentialRevisionStatus.php b/src/applications/differential/constants/DifferentialRevisionStatus.php
--- a/src/applications/differential/constants/DifferentialRevisionStatus.php
+++ b/src/applications/differential/constants/DifferentialRevisionStatus.php
@@ -72,10 +72,16 @@
}
public static function getClosedStatuses() {
- return array(
+ $statuses = array(
ArcanistDifferentialRevisionStatus::CLOSED,
ArcanistDifferentialRevisionStatus::ABANDONED,
);
+
+ if (PhabricatorEnv::getEnvConfig('differential.close-on-accept')) {
+ $statuses[] = ArcanistDifferentialRevisionStatus::ACCEPTED;
+ }
+
+ return $statuses;
}
public static function getOpenStatuses() {

File Metadata

Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/b5/6x/d4rrcwqotxg6n45g
Default Alt Text
D7654.diff (2 KB)

Event Timeline