1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 06:42:41 +01:00

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
This commit is contained in:
Brayden Winterton 2014-04-09 07:48:24 -07:00 committed by epriestley
parent 2714395d98
commit 7e394dcf11

View 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;
}