diff --git a/src/workflow/ArcanistTasksWorkflow.php b/src/workflow/ArcanistTasksWorkflow.php index ad88fc11..197a3ef0 100644 --- a/src/workflow/ArcanistTasksWorkflow.php +++ b/src/workflow/ArcanistTasksWorkflow.php @@ -122,29 +122,33 @@ EOTEXT 'len' => phutil_utf8_console_strlen($formatted_title), ); + // Render the "Priority" column. - switch ($task['priority']) { - case 'Needs Triage': - $color = 'magenta'; - break; - case 'Unbreak Now!': - $color = 'red'; - break; - case 'High': - $color = 'yellow'; - break; - case 'Normal': - $color = 'green'; - break; - case 'Low': - $color = 'blue'; - break; - case 'Wishlist': - $color = 'cyan'; - break; - default: - $color = 'white'; - break; + $web_to_terminal_colors = array( + 'violet' => 'magenta', + 'indigo' => 'magenta', + 'orange' => 'red', + 'sky' => 'cyan', + 'red' => 'red', + 'yellow' => 'yellow', + 'green' => 'green', + 'blue' => 'blue', + 'cyan' => 'cyan', + 'magenta' => 'magenta', + 'lightred' => 'red', + 'lightorange' => 'red', + 'lightyellow' => 'yellow', + 'lightgreen' => 'green', + 'lightblue' => 'blue', + 'lightsky' => 'blue', + 'lightindigo' => 'magenta', + 'lightviolet' => 'magenta' + ); + + if (isset($task['priorityColor'])) { + $color = idx($web_to_terminal_colors, $task['priorityColor'], 'white'); + } else { + $color = 'white'; } $formatted_priority = phutil_console_format( " %s",