From f8817b201d0de2eba111dda5168b6fbb4c044188 Mon Sep 17 00:00:00 2001 From: Henriette Dinger Date: Wed, 24 Apr 2019 10:09:13 +0200 Subject: [PATCH] Change board seed data --- .../demo_data/work_package_board_seeder.rb | 25 +++++++-------- config/locales/en.seeders.standard.yml | 31 ++----------------- spec/seeders/demo_data_seeder_spec.rb | 2 +- 3 files changed, 15 insertions(+), 43 deletions(-) diff --git a/app/seeders/demo_data/work_package_board_seeder.rb b/app/seeders/demo_data/work_package_board_seeder.rb index 8955328f74..0ed319c68b 100644 --- a/app/seeders/demo_data/work_package_board_seeder.rb +++ b/app/seeders/demo_data/work_package_board_seeder.rb @@ -107,6 +107,7 @@ module DemoData def seed_basic_board board = ::Boards::Grid.new project: project board.name = project_data_for(key, 'boards.basic.name') + board.options = { 'highlightingMode' => 'priority' } board.widgets = seed_basic_board_queries.each_with_index.map do |query, i| Grids::Widget.new start_row: 1, end_row: 2, @@ -145,21 +146,19 @@ module DemoData def query_list_work_package_association wps = [ - [WorkPackage.find_by(subject: 'Plan a hiking trip').id, - WorkPackage.find_by(subject: 'Sow flowers').id, - WorkPackage.find_by(subject: 'Cut the lawn').id, - WorkPackage.find_by(subject: 'Cut trees').id], - [WorkPackage.find_by(subject: 'Visit the fire department').id], - [WorkPackage.find_by(subject: 'Visit the ocean').id, - WorkPackage.find_by(subject: 'Learn how to dive').id], - [WorkPackage.find_by(subject: 'Eat more bananas').id, - WorkPackage.find_by(subject: 'Buy a parasol').id] + [WorkPackage.find_by(subject: 'Create a new project').id, + WorkPackage.find_by(subject: 'Edit a work package').id, + WorkPackage.find_by(subject: 'Create work packages').id, + WorkPackage.find_by(subject: 'Activate further modules').id], + [WorkPackage.find_by(subject: 'Create a project plan').id], + [WorkPackage.find_by(subject: 'Invite new team members').id], + [WorkPackage.find_by(subject: 'Customize project overview page').id] ] - [{ name: 'Green list', wps: wps[0] }, - { name: 'Red list', wps: wps[1] }, - { name: 'Blue list', wps: wps[2] }, - { name: 'Yellow list', wps: wps[3] }] + [{ name: 'Today', wps: wps[0] }, + { name: 'Tomorrow', wps: wps[1] }, + { name: 'Later', wps: wps[2] }, + { name: 'Never', wps: wps[3] }] end end end diff --git a/config/locales/en.seeders.standard.yml b/config/locales/en.seeders.standard.yml index 7b218301cc..e750d8a0bd 100644 --- a/config/locales/en.seeders.standard.yml +++ b/config/locales/en.seeders.standard.yml @@ -105,9 +105,9 @@ en: - assigned_to boards: kanban: - name: 'KANBAN Board' + name: 'Kanban board' basic: - name: 'Basic Board' + name: 'Task board' work_packages: - subject: Project kick-off description: Plan and execute the project kick-off. @@ -355,33 +355,6 @@ en: relations: - to: Develop v1.1 type: follows - - subject: Plan a hiking trip - status: :default_status_on_hold - type: :default_type_task - - subject: Sow flowers - status: :default_status_on_hold - type: :default_type_task - - subject: Cut the lawn - status: :default_status_on_hold - type: :default_type_task - - subject: Cut trees - status: :default_status_on_hold - type: :default_type_task - - subject: Visit the fire department - status: :default_status_on_hold - type: :default_type_task - - subject: Visit the ocean - status: :default_status_on_hold - type: :default_type_task - - subject: Learn how to dive - status: :default_status_on_hold - type: :default_type_task - - subject: Eat more bananas - status: :default_status_on_hold - type: :default_type_task - - subject: Buy a parasol - status: :default_status_on_hold - type: :default_type_task wiki: - title: Wiki content: | diff --git a/spec/seeders/demo_data_seeder_spec.rb b/spec/seeders/demo_data_seeder_spec.rb index ea1f9f823e..d3de760cbc 100644 --- a/spec/seeders/demo_data_seeder_spec.rb +++ b/spec/seeders/demo_data_seeder_spec.rb @@ -58,7 +58,7 @@ describe 'seeds' do expect(User.where(admin: true).count).to eq 1 expect(Project.count).to eq 2 - expect(WorkPackage.count).to eq 50 + expect(WorkPackage.count).to eq 41 expect(Wiki.count).to eq 2 expect(Query.where.not(hidden: true).count).to eq 8 expect(Query.count).to eq 16