Skip to content

Commit aeb8ac9

Browse files
committed
Fall back to default color for undefined severity/resolution
Fixes system notices when using customized enums having values not defined in the plugin's configuration (board_severity_colors and board_resolution_colors). Undefined values are displayed in white.
1 parent c8b7dfb commit aeb8ac9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Scrum/pages/board.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@
323323
<p class="scrumstatus"><?php echo get_enum_element("status", $status) ?></p>
324324
<?php endif ?>
325325
<?php if (isset($bugs[$status])) foreach ($bugs[$status] as $bug):
326-
$sevcolor = $sevcolors[$bug->severity];
327-
$rescolor = $rescolors[$bug->resolution];
326+
$sevcolor = array_key_exists($bug->severity, $sevcolors) ? $sevcolors[$bug->severity] : "white";
327+
$rescolor = array_key_exists($bug->resolution, $rescolors) ? $rescolors[$bug->resolution] : "white";
328328
?>
329329

330330
<div class="scrumblock">

0 commit comments

Comments
 (0)