mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-22 21:40:54 +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:
parent
2714395d98
commit
7e394dcf11
1 changed files with 19 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue