Extend seeder to add default description templates for types

pull/7616/head
Henriette Dinger 5 years ago committed by Wieland Lindenthal
parent f6aad25be3
commit 090c08a33d
  1. 15
      app/seeders/basic_data/type_seeder.rb
  2. 6
      config/locales/en.seeders.standard.yml.example

@ -61,7 +61,8 @@ module BasicData
is_default: values[1],
color_id: color_id,
is_in_roadmap: values[3],
is_milestone: values[4]
is_milestone: values[4],
description: type_description(values[5])
}
end
end
@ -73,5 +74,17 @@ module BasicData
def type_table
raise NotImplementedError
end
def type_description(type_name)
return '' if demo_data_for('default_description_for_types').nil?
demo_data_for('default_description_for_types').each do |entry|
if I18n.t(entry[:type]) === I18n.t(type_name)
return entry[:description]
else
return ''
end
end
end
end
end

@ -37,6 +37,12 @@ en:
* Doing the job
* Tracking the time
* Update ticket status
default_description_for_types:
- type: :default_type_bug
description: |
### Steps to reproduce
### Actual behavior
groups:
- name: 'Project Admins'
projects:

Loading…
Cancel
Save