From 7e394dcf11ebc7c731ba4885f9a24c8759162027 Mon Sep 17 00:00:00 2001 From: Brayden Winterton Date: Wed, 9 Apr 2014 07:48:24 -0700 Subject: [PATCH] Changed checking for a closed task in `arc tasks` to look for the isClosed property instead of a non-empty status 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 | 31 ++++++++++++++++---------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/workflow/ArcanistTasksWorkflow.php b/src/workflow/ArcanistTasksWorkflow.php index a97d0689..ad88fc11 100644 --- a/src/workflow/ArcanistTasksWorkflow.php +++ b/src/workflow/ArcanistTasksWorkflow.php @@ -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( + " %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( - " %s", - $status_text); - $output['status'] = array( - 'text' => $formatted_status, - 'len' => phutil_utf8_console_strlen('status') + 2, - ); $task_rows[] = $output; } -- 2.43.0