]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Changed checking for a closed task in `arc tasks` to look for the isClosed property...
authorBrayden Winterton <bwinterton@gmail.com>
Wed, 9 Apr 2014 14:48:24 +0000 (07:48 -0700)
committerepriestley <git@epriestley.com>
Wed, 9 Apr 2014 14:48:58 +0000 (07:48 -0700)
Summary: I changed the way `arc tasks` was checking to see if a maniphest task was closed from looking for a non-empty status to looking for the isClosed property submitted in D8731.

Test Plan: Run `arc tasks` and check that the tasks show open/closed correctly.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

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

src/workflow/ArcanistTasksWorkflow.php

index a97d06891c0a1192514d27a64f49c5699b8abf61..ad88fc112a6cc3a0e2471c89c5f4930416efb11d 100644 (file)
@@ -155,20 +155,27 @@ EOTEXT
       );
 
       // Render the "Status" column.
-      if ($task['status']) {
-        $status_text = 'Closed';
-        $status_color = 'red';
+      if (isset($task['isClosed'])) {
+        if ($task['isClosed']) {
+          $status_text = $task['statusName'];
+          $status_color = 'red';
+        } else {
+          $status_text = $task['statusName'];
+          $status_color = 'green';
+        }
+        $formatted_status = phutil_console_format(
+          "<bg:{$status_color}> </bg> %s",
+          $status_text);
+        $output['status'] = array(
+          'text'  => $formatted_status,
+          'len'   => phutil_utf8_console_strlen('status') + 2,
+        );
       } else {
-        $status_text = 'Open';
-        $status_color = 'green';
+        $output['status'] = array(
+          'text'  => "",
+          'len'   => 0,
+        );
       }
-      $formatted_status = phutil_console_format(
-        "<bg:{$status_color}> </bg> %s",
-        $status_text);
-      $output['status'] = array(
-        'text'  => $formatted_status,
-        'len'   => phutil_utf8_console_strlen('status') + 2,
-      );
 
       $task_rows[] = $output;
     }