Update type seed colors (#8265)

Fine-tune seeded colors

[ci skip]
pull/8268/head
Oliver Günther 5 years ago committed by GitHub
parent fc59abb55d
commit d460f8c7de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/seeders/basic_data/type_seeder.rb
  2. 8
      app/seeders/standard_seeder/basic_data/priority_seeder.rb
  3. 20
      app/seeders/standard_seeder/basic_data/status_seeder.rb
  4. 14
      app/seeders/standard_seeder/basic_data/type_seeder.rb
  5. 8
      modules/bim/app/seeders/bim/basic_data/priority_seeder.rb
  6. 4
      modules/bim/app/seeders/bim/basic_data/type_seeder.rb

@ -53,7 +53,7 @@ module BasicData
colors = colors.map { |c| { c.name => c.id } }.reduce({}, :merge)
type_table.map do |_name, values|
color_id = Color.find_by(id: values[2]) ? values[2] : colors[I18n.t(values[2])]
color_id = colors[values[2]] || values[2]
{
name: I18n.t(values[5]),

@ -31,10 +31,10 @@ module StandardSeeder
class PrioritySeeder < ::BasicData::PrioritySeeder
def data
color_names = [
'lime-0', # low
'green-1', # normal
'yellow-2', # high
'red-3', # immediate
'cyan-1', # low
'blue-3', # normal
'yellow-7', # high
'grape-5' # immediate
]
# When selecting for an array of values, implicit order is applied

@ -32,21 +32,21 @@ module StandardSeeder
class StatusSeeder < ::BasicData::StatusSeeder
def data
color_names = [
'teal-1', # new
'indigo-1', # in specification
'teal-3', # specified
'red-6', # confirmed
'cyan-7', # new
'blue-2', # in specification
'blue-2', # specified
'violet-2', # confirmed
'yellow-2', # tbs
'lime-2', # scheduled
'cyan-3', # in progress
'grape-5', # in progress
'cyan-3', # in development
'teal-6', # developed
'teal-7', # in testing
'teal-9', # tested
'red-9', # test_failed
'green-3', # developed
'cyan-5', # in testing
'teal-6', # tested
'red-5', # test_failed
'gray-3', # closed
'orange-3', # on hold
'red-3', # rejected
'red-3' # rejected
]
# When selecting for an array of values, implicit order is applied

@ -36,13 +36,13 @@ module StandardSeeder
def type_table
{ # position is_default color_id is_in_roadmap is_milestone
task: [1, true, :default_color_blue, true, false, :default_type_task],
milestone: [2, true, :default_color_green_light, false, true, :default_type_milestone],
phase: [3, true, :default_color_blue_dark, false, false, :default_type_phase],
feature: [4, true, :default_color_blue, true, false, :default_type_feature],
epic: [5, true, :default_color_orange, true, false, :default_type_epic],
user_story: [6, true, :default_color_grey_dark, true, false, :default_type_user_story],
bug: [7, true, :default_color_red, true, false, :default_type_bug]
task: [1, true, I18n.t(:default_color_blue), true, false, :default_type_task],
milestone: [2, true, I18n.t(:default_color_green_light), false, true, :default_type_milestone],
phase: [3, true, I18n.t(:default_color_blue_light), false, false, :default_type_phase],
feature: [4, true, 'indigo-5', true, false, :default_type_feature],
epic: [5, true, 'violet-5', true, false, :default_type_epic],
user_story: [6, true, 'orange-5', true, false, :default_type_user_story],
bug: [7, true, 'red-7', true, false, :default_type_bug]
}
end
end

@ -31,10 +31,10 @@ module Bim
class PrioritySeeder < ::BasicData::PrioritySeeder
def data
color_names = [
'lime-0', # low
'green-1', # normal
'yellow-2', # high
'red-3', # critical
'cyan-1', # low
'blue-3', # normal
'yellow-7', # high
'grape-5', # critical
]
# When selecting for an array of values, implicit order is applied

@ -53,9 +53,9 @@ module Bim
{ # position is_default color_id is_in_roadmap is_milestone
task: [1, true, colors[0], true, false, :default_type_task],
milestone: [2, true, colors[2], false, true, :default_type_milestone],
phase: [3, true, :default_color_gray, false, false, :default_type_phase],
phase: [3, true, I18n.t(:default_color_gray), false, false, :default_type_phase],
issue: [4, true, colors[1], true, false, 'seeders.bim.default_type_issue'],
remark: [5, true, :default_color_green_dark, true, false, 'seeders.bim.default_type_remark'],
remark: [5, true, I18n.t(:default_color_green_dark), true, false, 'seeders.bim.default_type_remark'],
request: [6, true, colors[3], true, false, 'seeders.bim.default_type_request'],
clash: [7, true, colors[4], true, false, 'seeders.bim.default_type_clash']
}

Loading…
Cancel
Save