mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 14:52:40 +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.
|
// Render the "Status" column.
|
||||||
if ($task['status']) {
|
if (isset($task['isClosed'])) {
|
||||||
$status_text = 'Closed';
|
if ($task['isClosed']) {
|
||||||
$status_color = 'red';
|
$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 {
|
} else {
|
||||||
$status_text = 'Open';
|
$output['status'] = array(
|
||||||
$status_color = 'green';
|
'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;
|
$task_rows[] = $output;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue