]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Add "Changes Planned" and "In Preparation" states for revisions
authorepriestley <git@epriestley.com>
Wed, 5 Mar 2014 18:44:26 +0000 (10:44 -0800)
committerepriestley <git@epriestley.com>
Wed, 5 Mar 2014 18:44:26 +0000 (10:44 -0800)
Summary:
Ref T2222. Discussion in T4481. Ref T2543.

Primarily, this will let me fix some of the rough edges that came out of ApplicationTransactions and state-based transitions.

I'm also adding a constant for T2543 while I'm in here.

Test Plan: Used `grep` to look for any weird special behavior, didn't see any.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran
Maniphest Tasks: T2543, T2222

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

src/differential/constants/ArcanistDifferentialRevisionStatus.php

index 4f641ee03890c0e17ff3d4f18b21844281c650e1..017000e9e9f683c1f82de190be6d8180d3055f9f 100644 (file)
@@ -7,14 +7,18 @@ final class ArcanistDifferentialRevisionStatus {
   const ACCEPTED          = 2;
   const CLOSED            = 3;
   const ABANDONED         = 4;
+  const CHANGES_PLANNED   = 5;
+  const IN_PREPARATION    = 6;
 
   public static function getNameForRevisionStatus($status) {
-    static $map = array(
-      self::NEEDS_REVIEW      => 'Needs Review',
-      self::NEEDS_REVISION    => 'Needs Revision',
-      self::ACCEPTED          => 'Accepted',
-      self::CLOSED            => 'Closed',
-      self::ABANDONED         => 'Abandoned',
+    $map = array(
+      self::NEEDS_REVIEW      => pht('Needs Review'),
+      self::NEEDS_REVISION    => pht('Needs Revision'),
+      self::ACCEPTED          => pht('Accepted'),
+      self::CLOSED            => pht('Closed'),
+      self::ABANDONED         => pht('Abandoned'),
+      self::CHANGES_PLANNED   => pht('Changes Planned'),
+      self::IN_PREPARATION    => pht('In Preparation'),
     );
 
     return idx($map, coalesce($status, '?'), 'Unknown');