diff --git a/app/assets/javascripts/backlogs/app/show_main.js b/app/assets/javascripts/backlogs/app/show_main.js index 9c128a9750..27f7de2a19 100644 --- a/app/assets/javascripts/backlogs/app/show_main.js +++ b/app/assets/javascripts/backlogs/app/show_main.js @@ -12,7 +12,8 @@ jQuery(function ($) { $('#assigned_to_id_options').change(function () { var selected = $(this).children(':selected'); if (!defaultDialogColor) { - defaultDialogColor = $('#rb .task').css('background-color'); + // fetch the color from the task rendered as a prototype/template for new tasks + defaultDialogColor = $('#issue_').css('background-color'); } $(this).parents('.ui-dialog').css('background-color', selected.attr('color') || defaultDialogColor); });