diff --git a/.travis.yml b/.travis.yml index a756091afb..6b0725949e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -91,10 +91,15 @@ jobs: - bash script/ci/runner.sh spec_legacy 1 1 if: env(SKIP_MYSQL_TESTING) IS blank - stage: test - name: 'spec_legacy (1/1) - postgres' + name: 'spec_legacy (1/1) - postgres standard' script: - bash script/ci/setup.sh spec_legacy postgres - bash script/ci/runner.sh spec_legacy 1 1 + - stage: test + name: 'spec_legacy (1/1) - postgres bim' + script: + - bash script/ci/setup.sh spec_legacy postgres bim + - bash script/ci/runner.sh spec_legacy 1 1 - stage: test name: 'units (1/4) - mysql' script: @@ -102,10 +107,15 @@ jobs: - bash script/ci/runner.sh units 4 1 if: env(SKIP_MYSQL_TESTING) IS blank - stage: test - name: 'units (1/4) - postgres' + name: 'units (1/4) - postgres standard' script: - bash script/ci/setup.sh units postgres - bash script/ci/runner.sh units 4 1 + - stage: test + name: 'units (1/4) - postgres bim' + script: + - bash script/ci/setup.sh units postgres bim + - bash script/ci/runner.sh units 4 1 - stage: test name: 'units (2/4) - mysql' script: @@ -113,10 +123,15 @@ jobs: - bash script/ci/runner.sh units 4 2 if: env(SKIP_MYSQL_TESTING) IS blank - stage: test - name: 'units (2/4) - postgres' + name: 'units (2/4) - postgres standard' script: - bash script/ci/setup.sh units postgres - bash script/ci/runner.sh units 4 2 + - stage: test + name: 'units (2/4) - postgres bim' + script: + - bash script/ci/setup.sh units postgres bim + - bash script/ci/runner.sh units 4 2 - stage: test name: 'units (3/4) - mysql' script: @@ -124,10 +139,15 @@ jobs: - bash script/ci/runner.sh units 4 3 if: env(SKIP_MYSQL_TESTING) IS blank - stage: test - name: 'units (3/4) - postgres' + name: 'units (3/4) - postgres standard' script: - bash script/ci/setup.sh units postgres - bash script/ci/runner.sh units 4 3 + - stage: test + name: 'units (3/4) - postgres bim' + script: + - bash script/ci/setup.sh units postgres bim + - bash script/ci/runner.sh units 4 3 - stage: test name: 'units (4/4) - mysql' script: @@ -135,10 +155,15 @@ jobs: - bash script/ci/runner.sh units 4 4 if: env(SKIP_MYSQL_TESTING) IS blank - stage: test - name: 'units (4/4) - postgres' + name: 'units (4/4) - postgres standard' script: - bash script/ci/setup.sh units postgres - bash script/ci/runner.sh units 4 4 + - stage: test + name: 'units (4/4) - postgres bim' + script: + - bash script/ci/setup.sh units postgres bim + - bash script/ci/runner.sh units 4 4 - stage: test name: 'features (1/4) - mysql' script: @@ -146,10 +171,15 @@ jobs: - bash script/ci/runner.sh features 4 1 if: env(SKIP_MYSQL_TESTING) IS blank - stage: test - name: 'features (1/4) - postgres' + name: 'features (1/4) - postgres standard' script: - bash script/ci/setup.sh features postgres - bash script/ci/runner.sh features 4 1 + - stage: test + name: 'features (1/4) - postgres bim' + script: + - bash script/ci/setup.sh features postgres bim + - bash script/ci/runner.sh features 4 1 - stage: test name: 'features (2/4) - mysql' script: @@ -157,10 +187,15 @@ jobs: - bash script/ci/runner.sh features 4 2 if: env(SKIP_MYSQL_TESTING) IS blank - stage: test - name: 'features (2/4) - postgres' + name: 'features (2/4) - postgres standard' script: - bash script/ci/setup.sh features postgres - bash script/ci/runner.sh features 4 2 + - stage: test + name: 'features (2/4) - postgres bim' + script: + - bash script/ci/setup.sh features postgres bim + - bash script/ci/runner.sh features 4 2 - stage: test name: 'features (3/4) - mysql' script: @@ -168,10 +203,15 @@ jobs: - bash script/ci/runner.sh features 4 3 if: env(SKIP_MYSQL_TESTING) IS blank - stage: test - name: 'features (3/4) - postgres' + name: 'features (3/4) - postgres standard' script: - bash script/ci/setup.sh features postgres - bash script/ci/runner.sh features 4 3 + - stage: test + name: 'features (3/4) - postgres bim' + script: + - bash script/ci/setup.sh features postgres bim + - bash script/ci/runner.sh features 4 3 - stage: test name: 'features (4/4) - mysql' script: @@ -179,10 +219,15 @@ jobs: - bash script/ci/runner.sh features 4 4 if: env(SKIP_MYSQL_TESTING) IS blank - stage: test - name: 'features (4/4) - postgres' + name: 'features (4/4) - postgres standard' script: - bash script/ci/setup.sh features postgres - bash script/ci/runner.sh features 4 4 + - stage: test + name: 'features (4/4) - postgres bim' + script: + - bash script/ci/setup.sh features postgres bim + - bash script/ci/runner.sh features 4 4 - stage: test name: 'plugins:units (1/1) - mysql' script: @@ -190,11 +235,17 @@ jobs: - bash script/ci/runner.sh plugins:units 1 1 if: env(SKIP_MYSQL_TESTING) IS blank AND head_branch !~ /^core\// - stage: test - name: 'plugins:units (1/1) - postgres' + name: 'plugins:units (1/1) - postgres standard' script: - bash script/ci/setup.sh plugins:units postgres - bash script/ci/runner.sh plugins:units 1 1 if: head_branch !~ /^core\// + - stage: test + name: 'plugins:units (1/1) - postgres bim' + script: + - bash script/ci/setup.sh plugins:units postgres bim + - bash script/ci/runner.sh plugins:units 1 1 + if: head_branch !~ /^core\// - stage: test name: 'plugins:features (1/1) - mysql' script: @@ -202,11 +253,17 @@ jobs: - bash script/ci/runner.sh plugins:features 1 1 if: env(SKIP_MYSQL_TESTING) IS blank AND head_branch !~ /^core\// - stage: test - name: 'plugins:features (1/1) - postgres' + name: 'plugins:features (1/1) - postgres standard' script: - bash script/ci/setup.sh plugins:features postgres - bash script/ci/runner.sh plugins:features 1 1 if: head_branch !~ /^core\// + - stage: test + name: 'plugins:features (1/1) - postgres bim' + script: + - bash script/ci/setup.sh plugins:features postgres bim + - bash script/ci/runner.sh plugins:features 1 1 + if: head_branch !~ /^core\// - stage: test name: 'plugins:cucumber (1/1) - mysql' script: @@ -214,11 +271,17 @@ jobs: - bash script/ci/runner.sh plugins:cucumber 1 1 if: env(SKIP_MYSQL_TESTING) IS blank AND head_branch !~ /^core\// - stage: test - name: 'plugins:cucumber (1/1) - postgres' + name: 'plugins:cucumber (1/1) - postgres standard' script: - bash script/ci/setup.sh plugins:cucumber postgres - bash script/ci/runner.sh plugins:cucumber 1 1 if: head_branch !~ /^core\// + - stage: test + name: 'plugins:cucumber (1/1) - postgres bim' + script: + - bash script/ci/setup.sh plugins:cucumber postgres bim + - bash script/ci/runner.sh plugins:cucumber 1 1 + if: head_branch !~ /^core\// addons: chrome: stable diff --git a/Gemfile.lock b/Gemfile.lock index bca13341dd..48e50a8cf6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -124,6 +124,11 @@ PATH acts_as_silent_list (~> 3.0.0) openproject-pdf_export +PATH + remote: modules/bim_seeder + specs: + openproject-bim_seeder (1.0.0) + PATH remote: modules/boards specs: @@ -970,6 +975,7 @@ DEPENDENCIES openproject-auth_saml! openproject-avatars! openproject-backlogs! + openproject-bim_seeder! openproject-boards! openproject-costs! openproject-documents! diff --git a/Gemfile.modules b/Gemfile.modules index f44339d05e..860d2ae172 100644 --- a/Gemfile.modules +++ b/Gemfile.modules @@ -39,6 +39,8 @@ group :opf_plugins do gem 'openproject-github_integration', path: 'modules/github_integration' gem 'openproject-ldap_groups', path: 'modules/ldap_groups' - gem 'grids', path: 'modules/grids' + gem 'grids', path: 'modules/grids' gem 'openproject-boards', path: 'modules/boards' + + gem 'openproject-bim_seeder', path: 'modules/bim_seeder', require: !!(ENV['OPENPROJECT_EDITION'] == 'bim') end diff --git a/app/assets/stylesheets/layout/_main_menu.sass b/app/assets/stylesheets/layout/_main_menu.sass index a89a3c3d6f..3d4b781635 100644 --- a/app/assets/stylesheets/layout/_main_menu.sass +++ b/app/assets/stylesheets/layout/_main_menu.sass @@ -29,6 +29,14 @@ $toggler-width: 40px $menu-item-line-height: 30px +@mixin main-menu-hover + @include varprop(background, main-menu-bg-hover-background) + @include varprop(color, main-menu-hover-font-color) + +@mixin main-menu-selected + @include varprop(background, main-menu-bg-selected-background) + @include varprop(color, main-menu-selected-font-color) + .main-menu @include varprop(width, main-menu-width) @include varprop(min-width, main-menu-width) @@ -126,26 +134,22 @@ $arrow-left-width: 40px .main-item-wrapper display: flex - &:hover - @if $main-menu-enable-toggle-highlighting != true - // simultaneously hover all menu item anchor tags - > a - @include varprop(color, main-menu-hover-font-color) - &.toggler - @include varprop(background, main-menu-bg-hover-background) + .toggler:hover + @include main-menu-hover a &.selected, &.selected + a - @include varprop(background, main-menu-bg-selected-background) - @include varprop(color, main-menu-selected-font-color) + @include main-menu-selected &:hover - @include varprop(background, main-menu-bg-hover-background) + @include main-menu-hover &:hover, &:focus , &:active - @include varprop(background, main-menu-bg-hover-background) - @include varprop(color, main-menu-hover-font-color) + @include main-menu-hover + + &~ .toggler + @include main-menu-hover a:not(.toggler) @extend .small-12 @@ -177,18 +181,15 @@ $arrow-left-width: 40px padding: initial &:hover - @if $main-menu-enable-toggle-highlighting != true - // simultaneously hover all menu item anchor tags - > a - @include varprop(color, main-menu-bg-hover-background) + // simultaneously hover all menu item anchor tags + > a + @include varprop(color, main-menu-bg-hover-background) > a &.selected, &.selected - @include varprop(background, main-menu-bg-selected-background) - @include varprop(color, main-menu-selected-font-color) + @include main-menu-selected &:hover, &:focus , &:active - @include varprop(color, main-menu-hover-font-color) - @include varprop(background, main-menu-bg-hover-background) + @include main-menu-hover .main-menu--children-menu-header padding: 10px 10px 0 10px @@ -203,8 +204,7 @@ $arrow-left-width: 40px padding-right: 14px width: 40px &:hover, &:focus, &:active - @include varprop(background, main-menu-bg-hover-background) - @include varprop(color, main-menu-hover-font-color) + @include main-menu-hover a.main-menu--parent-node display: inline-block @@ -217,8 +217,7 @@ a.main-menu--parent-node border-radius: 3px @include varprop(color, main-menu-font-color) &:hover, &:focus, &:active - @include varprop(background, main-menu-bg-hover-background) - @include varprop(color, main-menu-hover-font-color) + @include main-menu-hover // logic for showing either parent or child menu .main-menu diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index 402ff88bfe..5e6b9a4ad5 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -32,7 +32,7 @@ class ForumsController < ApplicationController before_action :find_project_by_project_id, :authorize before_action :new_forum, only: %i[new create] - before_action :find_forum, only: %i[show update move destroy] + before_action :find_forum, only: %i[show edit update move destroy] accept_key_auth :index, :show include SortHelper diff --git a/app/seeders/basic_data/activity_seeder.rb b/app/seeders/basic_data/activity_seeder.rb index 9382338950..97e65c4e4d 100644 --- a/app/seeders/basic_data/activity_seeder.rb +++ b/app/seeders/basic_data/activity_seeder.rb @@ -45,14 +45,7 @@ module BasicData end def data - [ - { name: I18n.t(:default_activity_management), position: 1, is_default: true }, - { name: I18n.t(:default_activity_specification), position: 2, is_default: false }, - { name: I18n.t(:default_activity_development), position: 3, is_default: false }, - { name: I18n.t(:default_activity_testing), position: 4, is_default: false }, - { name: I18n.t(:default_activity_support), position: 5, is_default: false }, - { name: I18n.t(:default_activity_other), position: 6, is_default: false } - ] + raise NotImplementedError end end end diff --git a/app/seeders/basic_data/status_seeder.rb b/app/seeders/basic_data/status_seeder.rb index ea14a6f0d3..0a80b68af1 100644 --- a/app/seeders/basic_data/status_seeder.rb +++ b/app/seeders/basic_data/status_seeder.rb @@ -45,46 +45,7 @@ module BasicData end def data - color_names = [ - 'teal-1', # new - 'indigo-1', # in specification - 'teal-3', # specified - 'red-6', # confirmed - 'yellow-2', # tbs - 'lime-2', # scheduled - 'cyan-3', # in progress - 'cyan-3', # in development - 'teal-6', # developed - 'teal-7', # in testing - 'teal-9', # tested - 'red-9', # test_failed - 'gray-3', # closed - 'orange-3', # on hold - 'red-3', # rejected - ] - - # When selecting for an array of values, implicit order is applied - # so we need to restore values by their name. - colors_by_name = Color.where(name: color_names).index_by(&:name) - colors = color_names.collect { |name| colors_by_name[name].id } - - [ - { name: I18n.t(:default_status_new), color_id: colors[0], is_closed: false, is_default: true, position: 1 }, - { name: I18n.t(:default_status_in_specification), color_id: colors[1], is_closed: false, is_default: false, position: 2 }, - { name: I18n.t(:default_status_specified), color_id: colors[2], is_closed: false, is_default: false, position: 3 }, - { name: I18n.t(:default_status_confirmed), color_id: colors[3], is_closed: false, is_default: false, position: 4 }, - { name: I18n.t(:default_status_to_be_scheduled), color_id: colors[4], is_closed: false, is_default: false, position: 5 }, - { name: I18n.t(:default_status_scheduled), color_id: colors[5], is_closed: false, is_default: false, position: 6 }, - { name: I18n.t(:default_status_in_progress), color_id: colors[6], is_closed: false, is_default: false, position: 7 }, - { name: I18n.t(:default_status_in_development), color_id: colors[7], is_closed: false, is_default: false, position: 8 }, - { name: I18n.t(:default_status_developed), color_id: colors[8], is_closed: false, is_default: false, position: 9 }, - { name: I18n.t(:default_status_in_testing), color_id: colors[9], is_closed: false, is_default: false, position: 10 }, - { name: I18n.t(:default_status_tested), color_id: colors[10], is_closed: false, is_default: false, position: 11 }, - { name: I18n.t(:default_status_test_failed), color_id: colors[11], is_closed: false, is_default: false, position: 12 }, - { name: I18n.t(:default_status_closed), color_id: colors[12], is_closed: true, is_default: false, position: 13 }, - { name: I18n.t(:default_status_on_hold), color_id: colors[13], is_closed: false, is_default: false, position: 14 }, - { name: I18n.t(:default_status_rejected), color_id: colors[14], is_closed: true, is_default: false, position: 15 } - ] + raise NotImplementedError end end end diff --git a/app/seeders/basic_data/type_seeder.rb b/app/seeders/basic_data/type_seeder.rb index 575f45b33f..18e4f5e8da 100644 --- a/app/seeders/basic_data/type_seeder.rb +++ b/app/seeders/basic_data/type_seeder.rb @@ -52,9 +52,9 @@ module BasicData colors = Color.all colors = colors.map { |c| { c.name => c.id } }.reduce({}, :merge) - type_table.map do |name, values| + type_table.map do |_name, values| { - name: I18n.t("default_type_#{name}"), + name: I18n.t(values[5]), position: values[0], is_default: values[1], color_id: colors[I18n.t(values[2])], @@ -65,19 +65,11 @@ module BasicData end def type_names - %i[task milestone phase feature epic user_story bug] + raise NotImplementedError end def type_table - { # position is_default color_id is_in_roadmap is_milestone - task: [1, true, :default_color_blue, true, false], - milestone: [2, true, :default_color_green_light, false, true], - phase: [3, true, :default_color_blue_dark, false, false], - feature: [4, true, :default_color_blue, true, false], - epic: [5, true, :default_color_orange, true, false], - user_story: [6, true, :default_color_grey_dark, true, false], - bug: [7, true, :default_color_red, true, false] - } + raise NotImplementedError end end end diff --git a/app/seeders/basic_data/workflow_seeder.rb b/app/seeders/basic_data/workflow_seeder.rb index 2bd982d87d..d34470977f 100644 --- a/app/seeders/basic_data/workflow_seeder.rb +++ b/app/seeders/basic_data/workflow_seeder.rb @@ -70,10 +70,10 @@ module BasicData manager = Role.where(name: I18n.t(:default_role_project_admin)).first puts ' ↳ Types' - TypeSeeder.new.seed! + type_seeder_class.new.seed! puts ' ↳ Statuses' - StatusSeeder.new.seed! + status_seeder_class.new.seed! # Workflow - Each type has its own workflow workflows.each { |type_id, statuses_for_type| @@ -92,34 +92,15 @@ module BasicData end def workflows - types = Type.all - types = types.map { |t| { t.name => t.id } }.reduce({}, :merge) + raise NotImplementedError + end - new = Status.find_by(name: I18n.t(:default_status_new)) - in_specification = Status.find_by(name: I18n.t(:default_status_in_specification)) - specified = Status.find_by(name: I18n.t(:default_status_specified)) - confirmed = Status.find_by(name: I18n.t(:default_status_confirmed)) - to_be_scheduled = Status.find_by(name: I18n.t(:default_status_to_be_scheduled)) - scheduled = Status.find_by(name: I18n.t(:default_status_scheduled)) - in_progress = Status.find_by(name: I18n.t(:default_status_in_progress)) - in_development = Status.find_by(name: I18n.t(:default_status_in_development)) - developed = Status.find_by(name: I18n.t(:default_status_developed)) - in_testing = Status.find_by(name: I18n.t(:default_status_in_testing)) - tested = Status.find_by(name: I18n.t(:default_status_tested)) - test_failed = Status.find_by(name: I18n.t(:default_status_test_failed)) - closed = Status.find_by(name: I18n.t(:default_status_closed)) - on_hold = Status.find_by(name: I18n.t(:default_status_on_hold)) - rejected = Status.find_by(name: I18n.t(:default_status_rejected)) + def type_seeder_class + raise NotImplementedError + end - { - types[I18n.t(:default_type_task)] => [new, in_progress, on_hold, rejected, closed], - types[I18n.t(:default_type_milestone)] => [new, to_be_scheduled, scheduled, in_progress, on_hold, rejected, closed], - types[I18n.t(:default_type_phase)] => [new, to_be_scheduled, scheduled, in_progress, on_hold, rejected, closed], - types[I18n.t(:default_type_feature)] => [new, in_specification, specified, in_development, developed, in_testing, tested, test_failed, on_hold, rejected, closed], - types[I18n.t(:default_type_epic)] => [new, in_specification, specified, in_development, developed, in_testing, tested, test_failed, on_hold, rejected, closed], - types[I18n.t(:default_type_user_story)] => [new, in_specification, specified, in_development, developed, in_testing, tested, test_failed, on_hold, rejected, closed], - types[I18n.t(:default_type_bug)] => [new, confirmed, in_development, developed, in_testing, tested, test_failed, on_hold, rejected, closed] - } + def status_seeder_class + raise NotImplementedError end end end diff --git a/app/seeders/basic_data_seeder.rb b/app/seeders/basic_data_seeder.rb index 25e6b92397..b817989e99 100644 --- a/app/seeders/basic_data_seeder.rb +++ b/app/seeders/basic_data_seeder.rb @@ -28,16 +28,7 @@ #++ class BasicDataSeeder < CompositeSeeder def data_seeder_classes - [ - BasicData::BuiltinRolesSeeder, - BasicData::RoleSeeder, - BasicData::ActivitySeeder, - BasicData::ColorSeeder, - BasicData::ColorSchemeSeeder, - BasicData::WorkflowSeeder, - BasicData::PrioritySeeder, - BasicData::SettingSeeder - ] + raise NotImplementedError end def namespace diff --git a/app/seeders/demo_data/custom_field_seeder.rb b/app/seeders/demo_data/custom_field_seeder.rb index eb44476b5e..80af22637f 100644 --- a/app/seeders/demo_data/custom_field_seeder.rb +++ b/app/seeders/demo_data/custom_field_seeder.rb @@ -40,7 +40,7 @@ module DemoData print ' ↳ Creating custom fields...' # create some custom fields and add them to the project - Array(translate_with_base_url("seeders.demo_data.projects.#{key}")[:custom_fields]).each do |name| + Array(project_data_for(key,'custom_fields')).each do |name| cf = WorkPackageCustomField.create!( name: name, regexp: '', diff --git a/app/seeders/demo_data/project_seeder.rb b/app/seeders/demo_data/project_seeder.rb index c0e624c621..35d72449af 100644 --- a/app/seeders/demo_data/project_seeder.rb +++ b/app/seeders/demo_data/project_seeder.rb @@ -1,5 +1,7 @@ #-- encoding: UTF-8 + #-- copyright + # OpenProject is a project management system. # Copyright (C) 2012-2015 the OpenProject Foundation (OPF) # @@ -30,7 +32,9 @@ module DemoData # Careful: The seeding recreates the seeded project before it runs, so any changes # on the seeded project will be lost. def seed_data! - ["scrum-project", "demo-project"].each do |key| + seed_projects = demo_data_for('projects').keys + + seed_projects.each do |key| puts " ↳ Creating #{key} project..." puts ' -Creating/Resetting project' @@ -82,7 +86,7 @@ module DemoData end def seed_settings - welcome = translate_with_base_url("seeders.demo_data.welcome") + welcome = demo_data_for('welcome') if welcome.present? Setting.welcome_title = welcome[:title] @@ -119,34 +123,32 @@ module DemoData def set_types(project, key) project.types.clear - Array(translate_with_base_url("seeders.demo_data.projects.#{key}.types")).each do |type_name| + Array(project_data_for(key, 'types')).each do |type_name| type = Type.find_by(name: translate_with_base_url(type_name)) project.types << type end end def seed_categories(project, key) - Array(translate_with_base_url("seeders.demo_data.projects.#{key}.categories")).each do |cat_name| + Array(project_data_for(key, 'categories')).each do |cat_name| project.categories.create name: cat_name end end def seed_news(project, key) - Array(translate_with_base_url("seeders.demo_data.projects.#{key}")[:news]).each do |news| + Array(project_data_for(key, 'news')).each do |news| News.create! project: project, title: news[:title], summary: news[:summary], description: news[:description] end end def seed_queries(project, key) - Array(translate_with_base_url("seeders.demo_data.projects.#{key}")[:queries]).each do |config| + Array(project_data_for(key, 'queries')).each do |config| QueryBuilder.new(config, project).create! end end def seed_versions(project, key) - version_data = translate_with_base_url("seeders.demo_data.projects.#{key}.versions") - - return if version_data.is_a?(String) && version_data.start_with?("translation missing") + version_data = Array(project_data_for(key, 'versions')) version_data.each do |attributes| VersionBuilder.new(attributes, project).create! @@ -156,8 +158,8 @@ module DemoData def seed_board(project) Forum.create!( project: project, - name: translate_with_base_url('seeders.demo_data.board.name'), - description: translate_with_base_url('seeders.demo_data.board.description') + name: demo_data_for('board.name'), + description: demo_data_for('board.description') ) end @@ -175,15 +177,15 @@ module DemoData end def project_name(key) - translate_with_base_url("seeders.demo_data.projects.#{key}.name") + project_data_for(key, 'name') end def project_identifier(key) - translate_with_base_url("seeders.demo_data.projects.#{key}.identifier") + project_data_for(key, 'identifier') end def project_description(key) - translate_with_base_url("seeders.demo_data.projects.#{key}.description") + project_data_for(key, 'description') end def project_types @@ -191,7 +193,7 @@ module DemoData end def project_modules(key) - translate_with_base_url("seeders.demo_data.projects.#{key}.modules") + project_data_for(key, 'modules') end def find_project(key) diff --git a/app/seeders/demo_data/wiki_seeder.rb b/app/seeders/demo_data/wiki_seeder.rb index e62ad46340..18dde5e664 100644 --- a/app/seeders/demo_data/wiki_seeder.rb +++ b/app/seeders/demo_data/wiki_seeder.rb @@ -35,7 +35,7 @@ module DemoData end def seed_data! - text = translate_with_base_url("seeders.demo_data.projects.#{key}.wiki") + text = project_data_for(key, 'wiki') return if text.is_a?(String) && text.start_with?("translation missing") diff --git a/app/seeders/demo_data/work_package_board_seeder.rb b/app/seeders/demo_data/work_package_board_seeder.rb index 86a478bccc..cb669d32a8 100644 --- a/app/seeders/demo_data/work_package_board_seeder.rb +++ b/app/seeders/demo_data/work_package_board_seeder.rb @@ -1,6 +1,7 @@ #-- encoding: UTF-8 #-- copyright + # OpenProject is a project management system. # Copyright (C) 2012-2015 the OpenProject Foundation (OPF) # @@ -38,9 +39,9 @@ module DemoData end def seed_data! - # Seed only for demo - if key == 'demo-project' - print ' ↳ Creating demo status board' + # Seed only for those projects that provide a `kanban` key, i.e. 'demo-project' in standard edition. + if project_has_data_for?(key, 'boards.kanban') + print ' ↳ Creating kanban board' seed_kanban_board @@ -52,7 +53,8 @@ module DemoData def seed_kanban_board board = ::Boards::Grid.new project: project - board.name = I18n.t('seeders.demo_data.projects.demo-project.boards.kanban.name') + + board.name = project_data_for(key, 'boards.kanban.name') board.options = { 'type' => 'action', 'attribute' => 'status', 'highlightingMode' => 'priority' } board.widgets = seed_kanban_board_queries.each_with_index.map do |query, i| @@ -74,7 +76,14 @@ module DemoData def seed_kanban_board_queries admin = User.admin.first - Status.where(name: ['New', 'In progress', 'Closed', 'Rejected']).to_a.map do |status| + status_names = ['New', 'In progress', 'Closed', 'Rejected'] + statuses = Status.where(name: status_names).to_a + + if statuses.size < status_names.size + raise StandardError.new "Not all statuses needed for seeding a KANBAN board are present. Check that they get seeded." + end + + statuses.to_a.map do |status| Query.new_default(project: project, user: admin).tap do |query| # Hide the query query.hidden = true diff --git a/app/seeders/demo_data/work_package_seeder.rb b/app/seeders/demo_data/work_package_seeder.rb index a642b8ed27..2cf30007d5 100644 --- a/app/seeders/demo_data/work_package_seeder.rb +++ b/app/seeders/demo_data/work_package_seeder.rb @@ -54,7 +54,7 @@ module DemoData private def seed_demo_work_packages - work_packages_data = translate_with_base_url("seeders.demo_data.projects.#{key}.work_packages") + work_packages_data = project_data_for(key, 'work_packages') work_packages_data.each do |attributes| print '.' @@ -152,7 +152,7 @@ module DemoData end def set_workpackage_relations - work_packages_data = translate_with_base_url("seeders.demo_data.projects.#{key}.work_packages") + work_packages_data = project_data_for(key, 'work_packages') work_packages_data.each do |attributes| create_relations attributes diff --git a/app/seeders/development_data/projects_seeder.rb b/app/seeders/development_data/projects_seeder.rb index de38af9e36..16244ccdc0 100644 --- a/app/seeders/development_data/projects_seeder.rb +++ b/app/seeders/development_data/projects_seeder.rb @@ -78,13 +78,15 @@ module DevelopmentData def seed_versions(projects) projects.each do |p| - version_data = I18n.t('seeders.demo_data.projects.scrum-project.versions') - version_data.each do |attributes| - p.versions << Version.create!( - name: attributes[:name], - status: attributes[:status], - sharing: attributes[:sharing] - ) + version_data = project_data_for('scrum-project', 'versions') + if version_data.is_a? Array + version_data.each do |attributes| + p.versions << Version.create!( + name: attributes[:name], + status: attributes[:status], + sharing: attributes[:sharing] + ) + end end end end diff --git a/app/seeders/random_data/forum_seeder.rb b/app/seeders/random_data/forum_seeder.rb index b8f28f873a..20c63d2590 100644 --- a/app/seeders/random_data/forum_seeder.rb +++ b/app/seeders/random_data/forum_seeder.rb @@ -34,8 +34,8 @@ module RandomData print ' ↳ Creating forum with posts' forum = Forum.create! project: project, - name: I18n.t('seeders.demo_data.board.name'), - description: I18n.t('seeders.demo_data.board.description') + name: I18n.t("seeders.#{OpenProject::Configuration['edition']}.demo_data.board.name"), + description: I18n.t("seeders.#{OpenProject::Configuration['edition']}.demo_data.board.description") rand(30).times do print '.' diff --git a/app/seeders/root_seeder.rb b/app/seeders/root_seeder.rb index 1e8cb176d3..2c29a9c666 100644 --- a/app/seeders/root_seeder.rb +++ b/app/seeders/root_seeder.rb @@ -1,5 +1,7 @@ #-- encoding: UTF-8 + #-- copyright + # OpenProject is a project management system. # Copyright (C) 2012-2018 the OpenProject Foundation (OPF) # @@ -52,8 +54,7 @@ class RootSeeder < Seeder def do_seed! ActiveRecord::Base.transaction do # Basic data needs be seeded before anything else. - puts '*** Seeding basic data' - BasicDataSeeder.new.seed! + seed_basic_data puts '*** Seeding admin user' AdminUserSeeder.new.seed! @@ -62,16 +63,7 @@ class RootSeeder < Seeder DemoDataSeeder.new.seed! if Rails.env.development? - puts '*** Seeding development data' - require 'factory_bot' - # Load FactoryBot factories - begin - ::FactoryBot.find_definitions - rescue => e - raise e unless e.message.downcase.include? "factory already registered" - end - - DevelopmentDataSeeder.new.seed! + seed_development_data end rails_engines.each do |engine| @@ -121,4 +113,24 @@ class RootSeeder < Seeder # Avoid asynchronous DeliverWorkPackageCreatedJob Delayed::Worker.delay_jobs = false end + + private + + def seed_development_data + puts '*** Seeding development data' + require 'factory_bot' + # Load FactoryBot factories + begin + ::FactoryBot.find_definitions + rescue => e + raise e unless e.message.downcase.include? "factory already registered" + end + + DevelopmentDataSeeder.new.seed! + end + + def seed_basic_data + puts "*** Seeding basic data for #{OpenProject::Configuration['edition']} edition" + ::StandardSeeder::BasicDataSeeder.new.seed! + end end diff --git a/app/seeders/seeder.rb b/app/seeders/seeder.rb index 7495f9296a..8e3ee3c2a3 100644 --- a/app/seeders/seeder.rb +++ b/app/seeders/seeder.rb @@ -56,4 +56,24 @@ class Seeder def translate_with_base_url(string) I18n.t(string, deep_interpolation: true, base_url: OpenProject::Configuration.rails_relative_url_root) end + + def edition_data_for(key) + data = translate_with_base_url("seeders.#{OpenProject::Configuration['edition']}.#{key}") + + return nil if data.is_a?(String) && data.start_with?("translation missing") + + data + end + + def demo_data_for(key) + edition_data_for("demo_data.#{key}") + end + + def project_data_for(project, key) + demo_data_for "projects.#{project}.#{key}" + end + + def project_has_data_for?(project, key) + I18n.exists?("seeders.#{OpenProject::Configuration['edition']}.demo_data.projects.#{project}.#{key}") + end end diff --git a/app/seeders/standard_seeder/basic_data/activity_seeder.rb b/app/seeders/standard_seeder/basic_data/activity_seeder.rb new file mode 100644 index 0000000000..4a741118fb --- /dev/null +++ b/app/seeders/standard_seeder/basic_data/activity_seeder.rb @@ -0,0 +1,46 @@ +#-- encoding: UTF-8 + +#-- copyright + +# OpenProject is a project management system. +# Copyright (C) 2012-2018 the OpenProject Foundation (OPF) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2017 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +module StandardSeeder + module BasicData + class ActivitySeeder < ::BasicData::ActivitySeeder + def data + [ + { name: I18n.t(:default_activity_management), position: 1, is_default: true }, + { name: I18n.t(:default_activity_specification), position: 2, is_default: false }, + { name: I18n.t(:default_activity_development), position: 3, is_default: false }, + { name: I18n.t(:default_activity_testing), position: 4, is_default: false }, + { name: I18n.t(:default_activity_support), position: 5, is_default: false }, + { name: I18n.t(:default_activity_other), position: 6, is_default: false } + ] + end + end + end +end diff --git a/app/seeders/standard_seeder/basic_data/status_seeder.rb b/app/seeders/standard_seeder/basic_data/status_seeder.rb new file mode 100644 index 0000000000..2738d73ba8 --- /dev/null +++ b/app/seeders/standard_seeder/basic_data/status_seeder.rb @@ -0,0 +1,78 @@ +#-- encoding: UTF-8 + +#-- copyright + +# OpenProject is a project management system. +# Copyright (C) 2012-2018 the OpenProject Foundation (OPF) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2017 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +module StandardSeeder + module BasicData + class StatusSeeder < ::BasicData::StatusSeeder + def data + color_names = [ + 'teal-1', # new + 'indigo-1', # in specification + 'teal-3', # specified + 'red-6', # confirmed + 'yellow-2', # tbs + 'lime-2', # scheduled + 'cyan-3', # in progress + 'cyan-3', # in development + 'teal-6', # developed + 'teal-7', # in testing + 'teal-9', # tested + 'red-9', # test_failed + 'gray-3', # closed + 'orange-3', # on hold + 'red-3', # rejected + ] + + # When selecting for an array of values, implicit order is applied + # so we need to restore values by their name. + colors_by_name = Color.where(name: color_names).index_by(&:name) + colors = color_names.collect { |name| colors_by_name[name].id } + + [ + { name: I18n.t(:default_status_new), color_id: colors[0], is_closed: false, is_default: true, position: 1 }, + { name: I18n.t(:default_status_in_specification), color_id: colors[1], is_closed: false, is_default: false, position: 2 }, + { name: I18n.t(:default_status_specified), color_id: colors[2], is_closed: false, is_default: false, position: 3 }, + { name: I18n.t(:default_status_confirmed), color_id: colors[3], is_closed: false, is_default: false, position: 4 }, + { name: I18n.t(:default_status_to_be_scheduled), color_id: colors[4], is_closed: false, is_default: false, position: 5 }, + { name: I18n.t(:default_status_scheduled), color_id: colors[5], is_closed: false, is_default: false, position: 6 }, + { name: I18n.t(:default_status_in_progress), color_id: colors[6], is_closed: false, is_default: false, position: 7 }, + { name: I18n.t(:default_status_in_development), color_id: colors[7], is_closed: false, is_default: false, position: 8 }, + { name: I18n.t(:default_status_developed), color_id: colors[8], is_closed: false, is_default: false, position: 9 }, + { name: I18n.t(:default_status_in_testing), color_id: colors[9], is_closed: false, is_default: false, position: 10 }, + { name: I18n.t(:default_status_tested), color_id: colors[10], is_closed: false, is_default: false, position: 11 }, + { name: I18n.t(:default_status_test_failed), color_id: colors[11], is_closed: false, is_default: false, position: 12 }, + { name: I18n.t(:default_status_closed), color_id: colors[12], is_closed: true, is_default: false, position: 13 }, + { name: I18n.t(:default_status_on_hold), color_id: colors[13], is_closed: false, is_default: false, position: 14 }, + { name: I18n.t(:default_status_rejected), color_id: colors[14], is_closed: true, is_default: false, position: 15 } + ] + end + end + end +end diff --git a/app/seeders/standard_seeder/basic_data/type_seeder.rb b/app/seeders/standard_seeder/basic_data/type_seeder.rb new file mode 100644 index 0000000000..1c5800b45b --- /dev/null +++ b/app/seeders/standard_seeder/basic_data/type_seeder.rb @@ -0,0 +1,51 @@ +#-- encoding: UTF-8 + +#-- copyright + +# OpenProject is a project management system. +# Copyright (C) 2012-2018 the OpenProject Foundation (OPF) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2017 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +module StandardSeeder + module BasicData + class TypeSeeder < ::BasicData::TypeSeeder + def type_names + %i[task milestone phase feature epic user_story bug] + end + + 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] + } + end + end + end +end diff --git a/app/seeders/standard_seeder/basic_data/workflow_seeder.rb b/app/seeders/standard_seeder/basic_data/workflow_seeder.rb new file mode 100644 index 0000000000..9a444ceb4f --- /dev/null +++ b/app/seeders/standard_seeder/basic_data/workflow_seeder.rb @@ -0,0 +1,74 @@ +#-- encoding: UTF-8 + +#-- copyright + +# OpenProject is a project management system. +# Copyright (C) 2012-2018 the OpenProject Foundation (OPF) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2017 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +module StandardSeeder + module BasicData + class WorkflowSeeder < ::BasicData::WorkflowSeeder + def workflows + types = Type.all + types = types.map { |t| { t.name => t.id } }.reduce({}, :merge) + + new = Status.find_by(name: I18n.t(:default_status_new)) + in_specification = Status.find_by(name: I18n.t(:default_status_in_specification)) + specified = Status.find_by(name: I18n.t(:default_status_specified)) + confirmed = Status.find_by(name: I18n.t(:default_status_confirmed)) + to_be_scheduled = Status.find_by(name: I18n.t(:default_status_to_be_scheduled)) + scheduled = Status.find_by(name: I18n.t(:default_status_scheduled)) + in_progress = Status.find_by(name: I18n.t(:default_status_in_progress)) + in_development = Status.find_by(name: I18n.t(:default_status_in_development)) + developed = Status.find_by(name: I18n.t(:default_status_developed)) + in_testing = Status.find_by(name: I18n.t(:default_status_in_testing)) + tested = Status.find_by(name: I18n.t(:default_status_tested)) + test_failed = Status.find_by(name: I18n.t(:default_status_test_failed)) + closed = Status.find_by(name: I18n.t(:default_status_closed)) + on_hold = Status.find_by(name: I18n.t(:default_status_on_hold)) + rejected = Status.find_by(name: I18n.t(:default_status_rejected)) + + { + types[I18n.t(:default_type_task)] => [new, in_progress, on_hold, rejected, closed], + types[I18n.t(:default_type_milestone)] => [new, to_be_scheduled, scheduled, in_progress, on_hold, rejected, closed], + types[I18n.t(:default_type_phase)] => [new, to_be_scheduled, scheduled, in_progress, on_hold, rejected, closed], + types[I18n.t(:default_type_feature)] => [new, in_specification, specified, in_development, developed, in_testing, tested, test_failed, on_hold, rejected, closed], + types[I18n.t(:default_type_epic)] => [new, in_specification, specified, in_development, developed, in_testing, tested, test_failed, on_hold, rejected, closed], + types[I18n.t(:default_type_user_story)] => [new, in_specification, specified, in_development, developed, in_testing, tested, test_failed, on_hold, rejected, closed], + types[I18n.t(:default_type_bug)] => [new, confirmed, in_development, developed, in_testing, tested, test_failed, on_hold, rejected, closed] + } + end + + def type_seeder_class + ::StandardSeeder::BasicData::TypeSeeder + end + + def status_seeder_class + ::StandardSeeder::BasicData::StatusSeeder + end + end + end +end diff --git a/app/seeders/standard_seeder/basic_data_seeder.rb b/app/seeders/standard_seeder/basic_data_seeder.rb new file mode 100644 index 0000000000..362f18a23f --- /dev/null +++ b/app/seeders/standard_seeder/basic_data_seeder.rb @@ -0,0 +1,46 @@ +#-- encoding: UTF-8 + +#-- copyright + +# OpenProject is a project management system. +# Copyright (C) 2012-2018 the OpenProject Foundation (OPF) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2017 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +module StandardSeeder + class BasicDataSeeder < ::BasicDataSeeder + def data_seeder_classes + [ + ::BasicData::BuiltinRolesSeeder, + ::BasicData::RoleSeeder, + ::StandardSeeder::BasicData::ActivitySeeder, + ::BasicData::ColorSeeder, + ::BasicData::ColorSchemeSeeder, + ::StandardSeeder::BasicData::WorkflowSeeder, + ::BasicData::PrioritySeeder, + ::BasicData::SettingSeeder + ] + end + end +end diff --git a/config/locales/crowdin/js-es.yml b/config/locales/crowdin/js-es.yml index 418096936e..3eeff77ba7 100644 --- a/config/locales/crowdin/js-es.yml +++ b/config/locales/crowdin/js-es.yml @@ -21,14 +21,14 @@ es: close_form_title: Cerrar formulario boards: upsale: - boards: Need to freely structure your work in a board view? + boards: "¿Necesitas estructurar libremente tu trabajo en una sección de tablero?" check_out_link: Vea la versión Enterprise Edition. card: - add_new: Add new card + add_new: Añadir nueva tarjeta highlighting: - inline: 'Highlight inline:' - entire_card_by: Entire card by - remove_from_list: Remove card from list + inline: 'Resaltar en línea:' + entire_card_by: Toda la tarjeta en + remove_from_list: Eliminar tarjeta de la lista clipboard: browser_error: Su navegador no soporta copiar al portapapeles. Por favor, copie el texto seleccionado manualmente. @@ -208,9 +208,9 @@ es: label_ascending: Ascendente label_author: 'Autor: %{user}' label_between: entre - label_board: Board + label_board: Tablero label_board_locked: Bloqueado - label_board_plural: Boards + label_board_plural: Tableros label_board_sticky: Adhesivo label_create_work_package: Crear un nuevo paquete de trabajo label_created_by: Creado por @@ -334,7 +334,7 @@ es: label_upload_notification: Cargando archivos… label_work_package_upload_notification: 'Subiendo archivos para el paquete de trabajo #%{id}: %{subject}' - label_wp_id_added_by: "#%{id} added by %{author}" + label_wp_id_added_by: "#%{id} añadido por %{author}" label_files_to_upload: 'Estos archivos se cargarán:' label_rejected_files: 'Estos archivos no pueden ser cargados:' label_rejected_files_reason: Estos archivos no pueden cargarse debido a que su @@ -379,12 +379,13 @@ es: una historia de usuario. Mediante funciones de arrastrar y colocar, puede actualizar el estado. boards: - overview: Manage your work within an intuitive Boards view. - lists: You can create multiple lists (columns) within one Board view, e.g. - to create a KANBAN board. - add: Click the + will add a new card to the list within a Board. - drag: Drag & Drop your cards within a list to re-order, or the another list. - A double click will open the details view. + overview: Gestiona tu trabajo en una sección intuitiva de Tableros. + lists: Puedes crear múltiples listas (columnas) contenidas en una única + sección del Tablero, por ej. para crear un tablero KANBAN. + add: Al hacer click en + se añadirá una nueva tarjeta a la lista + dentro de un Tablero. + drag: Arrastra y Coloca tus tarjetas en una lista para reorganizarlas, o + ponlas en la lista otros. Al hacer doble click se abrirá la ficha de detalles. wp: toggler: Ahora, veamos la sección Paquete de trabajo, que ofrece una vista más detallada de su trabajo. @@ -868,7 +869,7 @@ es: de trabajo enumerados se eliminarán recursivamente. deletes_children: También se eliminarán de forma recursiva todos los paquetes de trabajo secundarios y sus descendientes. - notice_no_results_to_display: No visible results to display. + notice_no_results_to_display: No se pueden mostrar resultados visibles. notice_successful_create: Creación exitosa. notice_successful_delete: Eliminado con éxito. notice_successful_update: Actualización correcta. diff --git a/config/locales/crowdin/js-ko.yml b/config/locales/crowdin/js-ko.yml index 1d8be63b97..e517d69e25 100644 --- a/config/locales/crowdin/js-ko.yml +++ b/config/locales/crowdin/js-ko.yml @@ -20,10 +20,10 @@ ko: close_form_title: 폼 닫기 boards: upsale: - boards: Need to freely structure your work in a board view? + boards: 당신의 작품을 이사회의 관점에서 자유롭게 구조화하겠습니까? check_out_link: Enterprise Edition을 체크아웃하세요. card: - add_new: Add new card + add_new: 새로운 카드를 추가하다 highlighting: inline: 'Highlight inline:' entire_card_by: Entire card by @@ -197,7 +197,7 @@ ko: label_ascending: 오름차순 label_author: '작성자: %{user}' label_between: 사이에 - label_board: Board + label_board: 게시판 label_board_locked: 잠김 label_board_plural: Boards label_board_sticky: 스티커형 diff --git a/config/locales/crowdin/js-ru.yml b/config/locales/crowdin/js-ru.yml index 3c0eccbdb0..a9b953413a 100644 --- a/config/locales/crowdin/js-ru.yml +++ b/config/locales/crowdin/js-ru.yml @@ -23,11 +23,11 @@ ru: boards: Нужно свободно структурировать свою работу в виде доски? check_out_link: Проверьте корпоративную версию. card: - add_new: Добавить новую карту + add_new: Добавить новую карточку highlighting: - inline: 'Подсветка:' - entire_card_by: Вся карта по - remove_from_list: Удалить карту из списка + inline: 'Выделение:' + entire_card_by: Вся карточка по + remove_from_list: Удалить карточку из списка clipboard: browser_error: Ваш браузер не поддерживает копирование в буфер обмена. Пожалуйста, скопируйте выделенный текст вручную. @@ -331,7 +331,7 @@ ru: label_upload_notification: Загрузка файлов... label_work_package_upload_notification: 'Загрузка файлов для пакета работ #%{id}: %{subject}' - label_wp_id_added_by: "#%{id} добавил(а) %{author}" + label_wp_id_added_by: "#%{id} добавлен %{author}" label_files_to_upload: 'Эти файлы будут загружены:' label_rejected_files: 'Эти файлы не могут быть загружены:' label_rejected_files_reason: Эти файлы не могут быть загружены, как их размер diff --git a/config/locales/crowdin/js-tr.yml b/config/locales/crowdin/js-tr.yml index a8ca785f6e..c8556b92d3 100644 --- a/config/locales/crowdin/js-tr.yml +++ b/config/locales/crowdin/js-tr.yml @@ -364,7 +364,7 @@ tr: the respective sprints. Here you can create epics, user stories, and bugs, prioritize via drag'n'drop and add them to a sprint. task_board_arrow: To see your Task board, open the Sprint drop-down... - task_board_select: "... and select the Task board entry." + task_board_select: "... ve Görev tahtası kayıtlarını seçin." task_board: The Task board visualizes the progress for this sprint. Add new tasks or impediments with the + icon next to a user story. Via drag'n'drop you can update the status. diff --git a/config/locales/crowdin/ko.yml b/config/locales/crowdin/ko.yml index 1bdc5a577d..930ec1a8f8 100644 --- a/config/locales/crowdin/ko.yml +++ b/config/locales/crowdin/ko.yml @@ -48,12 +48,12 @@ ko: no_results_content_title: 사용인증 모드가 없습니다. no_results_content_text: 새 사용인증 모드 생성 ldap_auth_sources: - connection_encryption: Connection encryption + connection_encryption: 연결 암호화 tls_mode: plain: 없음 - simple_tls: simple_tls - start_tls: start_tls - plain_description: Plain unencrypted connection, no TLS negotiation. + simple_tls: 단순 TLS + start_tls: TLS 시작 + plain_description: 일반 암호화 되지 않은 연결 TLS 협상 없음 simple_tls_description: Implicit TLS encryption, but no certificate validation. Use with caution and implicit trust of the LDAP connection. start_tls_description: Explicit TLS encryption with full validation. Use for @@ -350,10 +350,10 @@ ko: encoded_token: 엔터프라이즈 지원 토큰 active_user_count_restriction: 최대 활성 사용자 grids/grid: - page: Page + page: 페이지 row_count: Number of rows column_count: Number of columns - widgets: Widgets + widgets: 위젯 relation: delay: 지연 from: 작업 패키지 @@ -443,9 +443,9 @@ ko: type: 타입 watcher: 주시자 doorkeeper/application: - uid: Client ID + uid: 고객 ID secret: Client secret - owner: Owner + owner: 소유자 redirect_uri: Redirect URI client_credentials_user_id: Client Credentials User ID scopes: Scopes @@ -517,7 +517,7 @@ ko: enterprise_token: unreadable: 읽을 수 없습니다. 지원하는 토큰이 확실한가요? grids/grid: - overlaps: overlap. + overlaps: 오버랩 outside: is outside of the grid. end_before_start: end value needs to be larger than the start value. parse_schema_filter_params_service: @@ -1303,7 +1303,7 @@ ko: label_environment: 환경 label_estimates_and_time: 견적 및 시간 label_equals: 일치함 - label_everywhere: everywhere + label_everywhere: 어디에 있든지 label_example: 예 label_export_to: '다음에서도 사용 가능:' label_expanded_click_to_collapse: 확장되었습니다. 축소하려면 클릭하세요. @@ -1618,7 +1618,7 @@ ko: label_view_diff: 차이점 보기 label_view_revisions: 수정 보기 label_watched_work_packages: 주시하는 작업 패키지 - label_what_is_this: What is this? + label_what_is_this: 이게 뭐예요? label_week: 주 label_wiki_content_added: 위키 페이지 추가됨 label_wiki_content_updated: 위키 페이지 업데이트됨 @@ -2733,7 +2733,7 @@ ko: register_intro: If you are developing an OAuth API client application for OpenProject, you can register it using this form for all users to use. default_scopes: '' - client_id: Client ID + client_id: 고객 ID client_secret_notice: 'This is the only time we can print the client secret, please note it down and keep it secure. It should be treated as a password and cannot be retrieved by OpenProject at a later time. diff --git a/config/locales/crowdin/tr.yml b/config/locales/crowdin/tr.yml index 3eb9c3a116..4d64a20555 100644 --- a/config/locales/crowdin/tr.yml +++ b/config/locales/crowdin/tr.yml @@ -1378,7 +1378,7 @@ tr: label_group_by: Grupla label_group_new: Yeni grup label_group: Grup - label_group_named: Group %{name} + label_group_named: "%{name} Grubu" label_group_plural: Gruplar label_help: Yardım label_here: buraya @@ -2861,9 +2861,9 @@ tr: oauth: application: singular: OAuth application - plural: OAuth applications - named: OAuth application '%{name}' - new: New OAuth application + plural: OAuth uygulamaları + named: Oauth uygulaması %{name} + new: Yeni OAuth uygulaması default_scopes: "(Default scopes)" instructions: name: The name of your application. This will be displayed to other users diff --git a/config/locales/en.seeders.starndard.yml b/config/locales/en.seeders.starndard.yml new file mode 100644 index 0000000000..0f7ae1183a --- /dev/null +++ b/config/locales/en.seeders.starndard.yml @@ -0,0 +1,713 @@ +#-- copyright +# OpenProject is a project management system. +# Copyright (C) 2012-2018 the OpenProject Foundation (OPF) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2017 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +en: + seeders: + standard: + demo_data: + welcome: + title: "Welcome to OpenProject!" + text: | + Select one of the demo projects to get started with some demo data we have prepared for you. + + * [Demo project](%{base_url}/projects/demo-project): to get an overview about classical project management. + * [Scrum project](%{base_url}/projects/your-scrum-project): to learn about Agile and Scrum project management. + + Also, you can create a blank [new project](%{base_url}/projects/new). + + Never stop collaborating. With open source and open mind. + + You can change this welcome text [here](%{base_url}/settings). + projects: + demo-project: + name: Demo project + identifier: demo-project + description: > + **This is a demo project**. You can edit the description in + the [Project settings -> Description](%{base_url}/projects/demo-project/settings). + timeline: + name: Timeline + modules: + - work_package_tracking + - news + - wiki + - board_view + news: + - title: Welcome to your demo project + summary: > + We are glad you joined. + In this module you can communicate project news to your team members. + description: The actual news + types: + - :default_type_task + - :default_type_milestone + - :default_type_phase + - :default_type_feature + - :default_type_bug + categories: + - Category 1 (to be changed in Project settings) + queries: + - name: Bugs + status: open + type: :default_type_bug + - name: Project plan + status: open + timeline: true + sort_by: id + hierarchy: true + - name: Milestones + status: open + type: :default_type_milestone + timeline: true + columns: + - id + - type + - status + - subject + - start_date + - due_date + sort_by: id + - name: Tasks + status: open + type: :default_type_task + hierarchy: true + sort_by: id + columns: + - id + - subject + - priority + - type + - status + - assigned_to + boards: + kanban: + name: 'KANBAN Board' + work_packages: + - subject: Project kick-off + description: Plan and execute the project kick-off. + status: :default_status_scheduled + type: :default_type_milestone + priority: :default_priority_high + estimated_hours: 8 + start: 4 + duration: 0 + done_ratio: 50 + - subject: Project planning + description: | + Please execute the related tasks: + + * ##child:1 + * ##child:2 + * ##child:3 + * ##child:4 + * ##child:5 + * ##child:6 + * ##child:7 + status: :default_status_scheduled + type: :default_type_phase + priority: :default_priority_high + estimated_hours: 8 + start: 0 + duration: 3 + children: + - subject: Create a new project + description: | + Please [create a new project](%{base_url}/projects/new) from the project drop down menu in the left hand header navigation. + + **You can:** + * give your project a name, + * add a project description, + * create a project structure, + * set a project to public. + + **Visuals:** + ![new project](##attachment:"new_project.jpg") + + **Find out more:** + * https://www.openproject.org/help/administration/manage-projects/ + status: :default_status_in_progress + type: :default_type_task + start: 0 + duration: 0 + attachments: + - new_project.jpg + - subject: Customize project overview page + description: | + You can [customize your project overview page](%{base_url}/my_projects_overview/demo-project/page_layout) to add important information, such as project description, important links, work packages overview, news, and much more. + + **You can:** + * edit the project overview by clicking on the gear icon, + * add a project description, + * add links to important project information or custom reports, + * insert news or work packages, + * and much more. + + **Visuals:** + ![project overview](##attachment:"project_overview.jpg") + + **Find out more:** + * https://www.openproject.org/help/project-setup/ + status: :default_status_in_progress + type: :default_type_task + start: 0 + duration: 0 + attachments: + - project_overview.jpg + - subject: Activate further modules + description: | + Please activate further [Modules](%{base_url}/projects/demo-project/settings/modules) in the Project settings in order to have more features in your project. + + **You can:** + * add a Scrum module (Backlogs), + * add time tracking, reporting, and budgets (Time Tracking, Cost Reports, Budgets), + * add a wiki, + * add meetings, + * and more. + + **Visuals:** + ![project modules](##attachment:"project_modules.jpg") + + **Find out more:** + * https://www.openproject.org/help/activate-deactivate-modules/ + status: :default_status_new + type: :default_type_task + start: 0 + duration: 0 + attachments: + - project_modules.jpg + - subject: Invite new team members + description: | + Please invite new team members by going to [Members](%{base_url}/projects/demo-project/members) in the project navigation. + + **You can:** + * add existing users to a project by typing in their names, + * invite new users to OpenProject by typing in their email address, + * assign a certain role in this project for each user. + + **Visuals:** + ![project members](##attachment:"project_members.jpg") + + **Find out more:** + * https://www.openproject.org/help/add-project-members/ + status: :default_status_new + type: :default_type_task + start: 1 + duration: 1 + priority: :default_priority_high + attachments: + - project_members.jpg + - subject: Create work packages + description: | + Please create work packages for your project. Go to [Work package](%{base_url}/projects/demo-project/work_packages) and click the green +Create button. + + **You can**: + * create any type of work, e.g. features, tasks, bugs, risks, ideas, + * add a title and description, + * add attachments via copy and paste to the description, + * set status, priority and assign it to a team member, + * insert any custom field to the forms. + + **Visuals**: + ![create work package](##attachment:"create_work_package.jpg") + + **Find out more**: + * https://www.openproject.org/help/work-packages/create-new-work-package/ + status: :default_status_in_progress + type: :default_type_task + start: 1 + duration: 1 + priority: :default_priority_high + attachments: + - create_work_package.jpg + - subject: Create a project plan + description: | + Please create a project plan by going to [Project plan](##query:"Project plan") in the project navigation. + + **You can:** + * create new phases and milestones by simply clicking in the project plan, + * change phases and milestones with drag and drop, + * add labels, such as start and finish date, title, or assignee, + * add dependencies by right clicking on a phase or milestone and choose pre-decessor or follower, + * custom columns, group, filter and save timeline reports to have them at your fingertips. + + **Visuals:** + ![gantt chart](##attachment:"gantt_chart.jpg") + + **Find out more:** + * https://www.openproject.org/help/timelines/integrated-timeline-work-package-page/ + status: :default_status_new + type: :default_type_task + start: 2 + duration: 1 + priority: :default_priority_high + attachments: + - gantt_chart.jpg + - subject: Edit a work package + description: | + [Edit a work package](%{base_url}/projects/demo-project/work_packages/41/activity) by double clicking on a row in the list view or open the split screen with the "i". + + **You can**: + * change title or description, + * assign it to a team member, + * comment on topics or notify team members with @-notifications, + * set status, priority, finish dates or other custom fields, + * include documents or screenshots with copy & paste, + * add relations to other work packages, + * change forms in the Administration settings. + + **Visuals**: + ![edit work package](##attachment:"edit_work_package.jpg") + + **Find out more**: + * https://www.openproject.org/help/work-packages/ + status: :default_status_new + type: :default_type_task + start: 3 + duration: 0 + priority: :default_priority_high + attachments: + - edit_work_package.jpg + - subject: Develop v1.0 + status: :default_status_scheduled + type: :default_type_phase + start: 7 + duration: 17 + children: + - subject: Great feature + status: :default_status_developed + type: :default_type_feature + start: 7 + duration: 8 + - subject: Best feature + status: :default_status_specified + type: :default_type_feature + start: 16 + duration: 5 + relations: + - to: Great feature + type: follows + - subject: Terrible bug + status: :default_status_confirmed + type: :default_type_bug + start: 22 + duration: 2 + relations: + - to: Best feature + type: follows + - subject: Go-Live v1.0 + status: :default_status_scheduled + type: :default_type_milestone + start: 25 + duration: 0 + relations: + - to: Develop v1.0 + type: follows + - subject: Develop v1.1 + status: :default_status_scheduled + type: :default_type_phase + start: 28 + duration: 2 + children: + - subject: Wonderful feature + status: :default_status_new + type: :default_type_feature + start: 28 + duration: 1 + - subject: Ugly bug + status: :default_status_rejected + type: :default_type_bug + start: 30 + duration: 1 + relations: + - to: Wonderful feature + type: follows + - subject: Go-Live v1.1 + status: :default_status_to_be_scheduled + type: :default_type_milestone + start: 32 + duration: 0 + relations: + - to: Develop v1.1 + type: follows + wiki: + - title: Wiki + content: | + In this wiki you can collaboratively create and edit pages and sub-pages to create a project wiki. + + **You can:** + + * insert text and format it with the toolbar, + * insert text and images with copy and paste, + * paste formatted text directly from MSOffice documents, + * create a page hierarchy by inserting parent pages, + * use makros to include, e.g. table of contents, work packages lists or Gantt charts, + * include wiki pages in other text fields, e.g. project overview or meetings, + * reference tickets with one, two or three "#"+ticket number, depending on what information should be displayed, + * include links to other documents, + * view the change history, + * view as Mardown. + + **More information:** + https://www.openproject.org/help/wiki/ + children: + - title: Project documentation + content: | + This is a sub-page of the wiki. You can change this by editing the Parent page (Click the _EDIT_ button and see bottom of the page). + + ## Project scope + + ## Deliverables + children: + - title: Project manual + content: '' + scrum-project: + name: Scrum project + identifier: your-scrum-project + description: | + *This is a Scrum demo project.* + You can edit the project description in the [Project settings -> Description](%{base_url}/projects/your-scrum-project/settings). + timeline: + name: Timeline + modules: + - backlogs + - news + - wiki + - work_package_tracking + news: + - title: Welcome to your Scrum demo project + summary: > + We are glad you joined. + In this module you can communicate project news to your team members. + description: This is the news content. + versions: + - name: Bug Backlog + sharing: none + status: open + - name: Product Backlog + sharing: none + status: open + start: 15 + - name: Sprint 1 + sharing: none + status: open + start: 4 + duration: 7 + wiki: + title: Sprint 1 + content: | + ### Sprint planning meeting + + _Please document here topics to the Sprint planning meeting_ + + * Time boxed (8 h) + * Input: Product Backlog + * Output: Sprint Backlog + + * Divided into two additional time boxes of 4 h: + + * The Product Owner presents the team the [Product Backlog](%{base_url}/projects/your-scrum-project/backlogs) and the priorities and explanes the Sprint Goal, to which the team must agree. Together, they prioritize the topics from the Product Backlog which the team will take care of in the next sprint. The team committs to the discussed delivery. + * The team plans autonomously (without the Product Owner) in detail and breaks down the tasks from the discussed requirements to consolidate a [Sprint Backlog](%{base_url}/projects/your-scrum-project/backlogs). + + + ### Daily Scrum meeting + + _Please document here topics to the Daily Scrum meeting_ + + * Short, daily status meeting of the team. + * Time boxed (max. 15 min). + * Stand-up meeting to discuss the following topics from the [Task board](##sprint:"Sprint 1"). + * What do I plan to do until the next Daily Scrum? + * What has blocked my work (Impediments)? + * Scrum Master moderates and notes down [Sprint Impediments](##sprint:"Sprint 1"). + * Product Owner may participate may participate in order to stay informed. + + ### Sprint Review meeting + + _Please document here topcis to the Sprint Review meeting_ + + * Time boxed (4 h). + * A maximum of one hour of preparation time per person. + * The team shows the product owner and other interested persons what has been achieved in this sprint. + * Important: no dummies and no PowerPoint! Just finished product functionality (Increments) should be demonstrated. + * Feedback from Product Owner, stakeholders and others is desired and will be included in further work. + * Based on the demonstrated functionalities, the Product Owner decides to go live with this increment or to develop it further. This possibility allows an early ROI. + + + ### Sprint Retrospective + + _Please document here topcis to the Sprint Retrospective meeting_ + + * Time boxed (3 h). + * After Sprint Review, will be moderated by Scrum Master. + * The team discusses the sprint: what went well, what needs to be improved to be more productive for the next sprint or even have more fun. + - name: Sprint 2 + sharing: none + status: open + types: + - :default_type_task + - :default_type_milestone + - :default_type_phase + - :default_type_epic + - :default_type_user_story + - :default_type_bug + categories: + - Category 1 (to be changed in Project settings) + queries: + - name: Project plan + status: open + sort_by: id + type: + - :default_type_milestone + - :default_type_phase + timeline: true + - name: Product backlog + status: open + version: Product Backlog + group_by: status + sort_by: status + columns: + - id + - type + - subject + - priority + - status + - assigned_to + - story_points + - name: Sprint 1 + status: open + version: Sprint 1 + hierarchy: true + columns: + - id + - type + - subject + - priority + - status + - assigned_to + - done_ratio + - story_points + - name: Tasks + status: open + type: :default_type_task + hierarchy: true + work_packages: + - subject: New login screen + status: :default_status_in_specification + type: :default_type_user_story + version: Product Backlog + position: 3 + - subject: Password reset does not send email + status: :default_status_confirmed + type: :default_type_bug + version: Bug Backlog + position: 1 + - subject: New website + status: :default_status_new + type: :default_type_epic + start: 26 + duration: 0 + children: + - subject: Newsletter registration form + status: :default_status_new + type: :default_type_user_story + version: Product Backlog + position: 6 + - subject: Implement product tour + status: :default_status_new + type: :default_type_user_story + version: Product Backlog + position: 4 + - subject: New landing page + status: :default_status_specified + type: :default_type_user_story + version: Sprint 1 + position: 2 + story_points: 3 + start: 26 + duration: 0 + children: + - subject: Create wireframes for new landing page + status: :default_status_in_progress + type: :default_type_task + version: Sprint 1 + start: 26 + duration: 0 + - subject: Contact form + status: :default_status_specified + type: :default_type_user_story + version: Sprint 1 + position: 5 + start: 21 + duration: 0 + story_points: 1 + - subject: Feature carousel + status: :default_status_specified + type: :default_type_user_story + version: Sprint 1 + position: 3 + story_points: 5 + children: + - subject: Make screenshots for feature tour + status: :default_status_closed + type: :default_type_task + version: Sprint 1 + - subject: Wrong hover color + status: :default_status_confirmed + type: :default_type_bug + version: Sprint 1 + position: 4 + story_points: 1 + start: 21 + duration: 0 + - subject: SSL certificate + status: :default_status_specified + type: :default_type_user_story + version: Product Backlog + position: 1 + start: 22 + duration: 1 + - subject: Set-up Staging environment + status: :default_status_in_specification + type: :default_type_user_story + version: Product Backlog + position: 2 + start: 23 + duration: 0 + - subject: Choose a content management system + status: :default_status_specified + type: :default_type_user_story + version: Product Backlog + position: 7 + start: 24 + duration: 1 + - subject: Website navigation structure + status: :default_status_specified + type: :default_type_user_story + version: Sprint 1 + position: 7 + story_points: 3 + start: 25 + duration: 0 + children: + - subject: Set up navigation concept for website. + status: :default_status_new + type: :default_type_task + version: Sprint 1 + start: 25 + duration: 0 + - subject: Internal link structure + status: :default_status_new + type: :default_type_user_story + version: Product Backlog + position: 5 + start: 25 + duration: 0 + - subject: Develop v1.0 + status: :default_status_new + type: :default_type_phase + start: 14 + duration: 3 + - subject: Release v1.0 + status: :default_status_new + type: :default_type_milestone + start: 18 + duration: 0 + relations: + - to: Develop v1.0 + type: follows + - subject: Develop v1.1 + status: :default_status_new + type: :default_type_phase + start: 21 + duration: 3 + - subject: Release v1.1 + status: :default_status_new + type: :default_type_milestone + start: 25 + duration: 0 + relations: + - to: Develop v1.1 + type: follows + - subject: Develop v2.0 + status: :default_status_new + type: :default_type_phase + start: 28 + duration: 3 + - subject: Release v2.0 + status: :default_status_new + type: :default_type_milestone + start: 32 + duration: 0 + relations: + - to: Develop v2.0 + type: follows + wiki: | + ### Sprint planning meeting + + _Please document here topics to the Sprint planning meeting_ + + * Time boxed (8 h) + * Input: Product Backlog + * Output: Sprint Backlog + + * Divided into two additional time boxes of 4 h: + + * The Product Owner presents the team the [Product Backlog](%{base_url}/projects/your-scrum-project/backlogs) and the priorities and explanes the Sprint Goal, to which the team must agree. Together, they prioritize the topics from the Product Backlog which the team will take care of in the next sprint. The team committs to the discussed delivery. + * The team plans autonomously (without the Product Owner) in detail and breaks down the tasks from the discussed requirements to consolidate a [Sprint Backlog](%{base_url}/projects/your-scrum-project/backlogs). + + + ### Daily Scrum meeting + + _Please document here topics to the Daily Scrum meeting_ + + * Short, daily status meeting of the team. + * Time boxed (max. 15 min). + * Stand-up meeting to discuss the following topics from the Task board. + * What do I plan to do until the next Daily Scrum? + * What has blocked my work (Impediments)? + * Scrum Master moderates and notes down Sprint Impediments. + * Product Owner may participate may participate in order to stay informed. + + ### Sprint Review meeting + + _Please document here topcis to the Sprint Review meeting_ + + * Time boxed (4 h). + * A maximum of one hour of preparation time per person. + * The team shows the product owner and other interested persons what has been achieved in this sprint. + * Important: no dummies and no PowerPoint! Just finished product functionality (Increments) should be demonstrated. + * Feedback from Product Owner, stakeholders and others is desired and will be included in further work. + * Based on the demonstrated functionalities, the Product Owner decides to go live with this increment or to develop it further. This possibility allows an early ROI. + + + ### Sprint Retrospective + + _Please document here topcis to the Sprint Retrospective meeting_ + + * Time boxed (3 h). + * After Sprint Review, will be moderated by Scrum Master. + * The team discusses the sprint: what went well, what needs to be improved to be more productive for the next sprint or even have more fun. diff --git a/config/locales/en.seeders.yml b/config/locales/en.seeders.yml deleted file mode 100644 index 42dbccd8b5..0000000000 --- a/config/locales/en.seeders.yml +++ /dev/null @@ -1,712 +0,0 @@ -#-- copyright -# OpenProject is a project management system. -# Copyright (C) 2012-2018 the OpenProject Foundation (OPF) -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License version 3. -# -# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: -# Copyright (C) 2006-2017 Jean-Philippe Lang -# Copyright (C) 2010-2013 the ChiliProject Team -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# See docs/COPYRIGHT.rdoc for more details. -#++ -en: - seeders: - demo_data: - welcome: - title: "Welcome to OpenProject!" - text: | - Select one of the demo projects to get started with some demo data we have prepared for you. - - * [Demo project](%{base_url}/projects/demo-project): to get an overview about classical project management. - * [Scrum project](%{base_url}/projects/your-scrum-project): to learn about Agile and Scrum project management. - - Also, you can create a blank [new project](%{base_url}/projects/new). - - Never stop collaborating. With open source and open mind. - - You can change this welcome text [here](%{base_url}/settings). - projects: - demo-project: - name: Demo project - identifier: demo-project - description: > - **This is a demo project**. You can edit the description in - the [Project settings -> Description](%{base_url}/projects/demo-project/settings). - timeline: - name: Timeline - modules: - - work_package_tracking - - board_view - - news - - wiki - news: - - title: Welcome to your demo project - summary: > - We are glad you joined. - In this module you can communicate project news to your team members. - description: The actual news - types: - - :default_type_task - - :default_type_milestone - - :default_type_phase - - :default_type_feature - - :default_type_bug - categories: - - Category 1 (to be changed in Project settings) - queries: - - name: Bugs - status: open - type: :default_type_bug - - name: Project plan - status: open - timeline: true - sort_by: id - hierarchy: true - - name: Milestones - status: open - type: :default_type_milestone - timeline: true - columns: - - id - - type - - status - - subject - - start_date - - due_date - sort_by: id - - name: Tasks - status: open - type: :default_type_task - hierarchy: true - sort_by: id - columns: - - id - - subject - - priority - - type - - status - - assigned_to - boards: - kanban: - name: 'KANBAN Board' - work_packages: - - subject: Project kick-off - description: Plan and execute the project kick-off. - status: :default_status_scheduled - type: :default_type_milestone - priority: :default_priority_high - estimated_hours: 8 - start: 4 - duration: 0 - done_ratio: 50 - - subject: Project planning - description: | - Please execute the related tasks: - - * ##child:1 - * ##child:2 - * ##child:3 - * ##child:4 - * ##child:5 - * ##child:6 - * ##child:7 - status: :default_status_scheduled - type: :default_type_phase - priority: :default_priority_high - estimated_hours: 8 - start: 0 - duration: 3 - children: - - subject: Create a new project - description: | - Please [create a new project](%{base_url}/projects/new) from the project drop down menu in the left hand header navigation. - - **You can:** - * give your project a name, - * add a project description, - * create a project structure, - * set a project to public. - - **Visuals:** - ![new project](##attachment:"new_project.jpg") - - **Find out more:** - * https://www.openproject.org/help/administration/manage-projects/ - status: :default_status_in_progress - type: :default_type_task - start: 0 - duration: 0 - attachments: - - new_project.jpg - - subject: Customize project overview page - description: | - You can [customize your project overview page](%{base_url}/my_projects_overview/demo-project/page_layout) to add important information, such as project description, important links, work packages overview, news, and much more. - - **You can:** - * edit the project overview by clicking on the gear icon, - * add a project description, - * add links to important project information or custom reports, - * insert news or work packages, - * and much more. - - **Visuals:** - ![project overview](##attachment:"project_overview.jpg") - - **Find out more:** - * https://www.openproject.org/help/project-setup/ - status: :default_status_in_progress - type: :default_type_task - start: 0 - duration: 0 - attachments: - - project_overview.jpg - - subject: Activate further modules - description: | - Please activate further [Modules](%{base_url}/projects/demo-project/settings/modules) in the Project settings in order to have more features in your project. - - **You can:** - * add a Scrum module (Backlogs), - * add time tracking, reporting, and budgets (Time Tracking, Cost Reports, Budgets), - * add a wiki, - * add meetings, - * and more. - - **Visuals:** - ![project modules](##attachment:"project_modules.jpg") - - **Find out more:** - * https://www.openproject.org/help/activate-deactivate-modules/ - status: :default_status_new - type: :default_type_task - start: 0 - duration: 0 - attachments: - - project_modules.jpg - - subject: Invite new team members - description: | - Please invite new team members by going to [Members](%{base_url}/projects/demo-project/members) in the project navigation. - - **You can:** - * add existing users to a project by typing in their names, - * invite new users to OpenProject by typing in their email address, - * assign a certain role in this project for each user. - - **Visuals:** - ![project members](##attachment:"project_members.jpg") - - **Find out more:** - * https://www.openproject.org/help/add-project-members/ - status: :default_status_new - type: :default_type_task - start: 1 - duration: 1 - priority: :default_priority_high - attachments: - - project_members.jpg - - subject: Create work packages - description: | - Please create work packages for your project. Go to [Work package](%{base_url}/projects/demo-project/work_packages) and click the green +Create button. - - **You can**: - * create any type of work, e.g. features, tasks, bugs, risks, ideas, - * add a title and description, - * add attachments via copy and paste to the description, - * set status, priority and assign it to a team member, - * insert any custom field to the forms. - - **Visuals**: - ![create work package](##attachment:"create_work_package.jpg") - - **Find out more**: - * https://www.openproject.org/help/work-packages/create-new-work-package/ - status: :default_status_in_progress - type: :default_type_task - start: 1 - duration: 1 - priority: :default_priority_high - attachments: - - create_work_package.jpg - - subject: Create a project plan - description: | - Please create a project plan by going to [Project plan](##query:"Project plan") in the project navigation. - - **You can:** - * create new phases and milestones by simply clicking in the project plan, - * change phases and milestones with drag and drop, - * add labels, such as start and finish date, title, or assignee, - * add dependencies by right clicking on a phase or milestone and choose pre-decessor or follower, - * custom columns, group, filter and save timeline reports to have them at your fingertips. - - **Visuals:** - ![gantt chart](##attachment:"gantt_chart.jpg") - - **Find out more:** - * https://www.openproject.org/help/timelines/integrated-timeline-work-package-page/ - status: :default_status_new - type: :default_type_task - start: 2 - duration: 1 - priority: :default_priority_high - attachments: - - gantt_chart.jpg - - subject: Edit a work package - description: | - [Edit a work package](%{base_url}/projects/demo-project/work_packages/41/activity) by double clicking on a row in the list view or open the split screen with the "i". - - **You can**: - * change title or description, - * assign it to a team member, - * comment on topics or notify team members with @-notifications, - * set status, priority, finish dates or other custom fields, - * include documents or screenshots with copy & paste, - * add relations to other work packages, - * change forms in the Administration settings. - - **Visuals**: - ![edit work package](##attachment:"edit_work_package.jpg") - - **Find out more**: - * https://www.openproject.org/help/work-packages/ - status: :default_status_new - type: :default_type_task - start: 3 - duration: 0 - priority: :default_priority_high - attachments: - - edit_work_package.jpg - - subject: Develop v1.0 - status: :default_status_scheduled - type: :default_type_phase - start: 7 - duration: 17 - children: - - subject: Great feature - status: :default_status_developed - type: :default_type_feature - start: 7 - duration: 8 - - subject: Best feature - status: :default_status_specified - type: :default_type_feature - start: 16 - duration: 5 - relations: - - to: Great feature - type: follows - - subject: Terrible bug - status: :default_status_confirmed - type: :default_type_bug - start: 22 - duration: 2 - relations: - - to: Best feature - type: follows - - subject: Go-Live v1.0 - status: :default_status_scheduled - type: :default_type_milestone - start: 25 - duration: 0 - relations: - - to: Develop v1.0 - type: follows - - subject: Develop v1.1 - status: :default_status_scheduled - type: :default_type_phase - start: 28 - duration: 2 - children: - - subject: Wonderful feature - status: :default_status_new - type: :default_type_feature - start: 28 - duration: 1 - - subject: Ugly bug - status: :default_status_rejected - type: :default_type_bug - start: 30 - duration: 1 - relations: - - to: Wonderful feature - type: follows - - subject: Go-Live v1.1 - status: :default_status_to_be_scheduled - type: :default_type_milestone - start: 32 - duration: 0 - relations: - - to: Develop v1.1 - type: follows - wiki: - - title: Wiki - content: | - In this wiki you can collaboratively create and edit pages and sub-pages to create a project wiki. - - **You can:** - - * insert text and format it with the toolbar, - * insert text and images with copy and paste, - * paste formatted text directly from MSOffice documents, - * create a page hierarchy by inserting parent pages, - * use makros to include, e.g. table of contents, work packages lists or Gantt charts, - * include wiki pages in other text fields, e.g. project overview or meetings, - * reference tickets with one, two or three "#"+ticket number, depending on what information should be displayed, - * include links to other documents, - * view the change history, - * view as Mardown. - - **More information:** - https://www.openproject.org/help/wiki/ - children: - - title: Project documentation - content: | - This is a sub-page of the wiki. You can change this by editing the Parent page (Click the _EDIT_ button and see bottom of the page). - - ## Project scope - - ## Deliverables - children: - - title: Project manual - content: '' - scrum-project: - name: Scrum project - identifier: your-scrum-project - description: | - *This is a Scrum demo project.* - You can edit the project description in the [Project settings -> Description](%{base_url}/projects/your-scrum-project/settings). - timeline: - name: Timeline - modules: - - backlogs - - news - - wiki - - work_package_tracking - news: - - title: Welcome to your Scrum demo project - summary: > - We are glad you joined. - In this module you can communicate project news to your team members. - description: This is the news content. - versions: - - name: Bug Backlog - sharing: none - status: open - - name: Product Backlog - sharing: none - status: open - start: 15 - - name: Sprint 1 - sharing: none - status: open - start: 4 - duration: 7 - wiki: - title: Sprint 1 - content: | - ### Sprint planning meeting - - _Please document here topics to the Sprint planning meeting_ - - * Time boxed (8 h) - * Input: Product Backlog - * Output: Sprint Backlog - - * Divided into two additional time boxes of 4 h: - - * The Product Owner presents the team the [Product Backlog](%{base_url}/projects/your-scrum-project/backlogs) and the priorities and explanes the Sprint Goal, to which the team must agree. Together, they prioritize the topics from the Product Backlog which the team will take care of in the next sprint. The team committs to the discussed delivery. - * The team plans autonomously (without the Product Owner) in detail and breaks down the tasks from the discussed requirements to consolidate a [Sprint Backlog](%{base_url}/projects/your-scrum-project/backlogs). - - - ### Daily Scrum meeting - - _Please document here topics to the Daily Scrum meeting_ - - * Short, daily status meeting of the team. - * Time boxed (max. 15 min). - * Stand-up meeting to discuss the following topics from the [Task board](##sprint:"Sprint 1"). - * What do I plan to do until the next Daily Scrum? - * What has blocked my work (Impediments)? - * Scrum Master moderates and notes down [Sprint Impediments](##sprint:"Sprint 1"). - * Product Owner may participate may participate in order to stay informed. - - ### Sprint Review meeting - - _Please document here topcis to the Sprint Review meeting_ - - * Time boxed (4 h). - * A maximum of one hour of preparation time per person. - * The team shows the product owner and other interested persons what has been achieved in this sprint. - * Important: no dummies and no PowerPoint! Just finished product functionality (Increments) should be demonstrated. - * Feedback from Product Owner, stakeholders and others is desired and will be included in further work. - * Based on the demonstrated functionalities, the Product Owner decides to go live with this increment or to develop it further. This possibility allows an early ROI. - - - ### Sprint Retrospective - - _Please document here topcis to the Sprint Retrospective meeting_ - - * Time boxed (3 h). - * After Sprint Review, will be moderated by Scrum Master. - * The team discusses the sprint: what went well, what needs to be improved to be more productive for the next sprint or even have more fun. - - name: Sprint 2 - sharing: none - status: open - types: - - :default_type_task - - :default_type_milestone - - :default_type_phase - - :default_type_epic - - :default_type_user_story - - :default_type_bug - categories: - - Category 1 (to be changed in Project settings) - queries: - - name: Project plan - status: open - sort_by: id - type: - - :default_type_milestone - - :default_type_phase - timeline: true - - name: Product backlog - status: open - version: Product Backlog - group_by: status - sort_by: status - columns: - - id - - type - - subject - - priority - - status - - assigned_to - - story_points - - name: Sprint 1 - status: open - version: Sprint 1 - hierarchy: true - columns: - - id - - type - - subject - - priority - - status - - assigned_to - - done_ratio - - story_points - - name: Tasks - status: open - type: :default_type_task - hierarchy: true - work_packages: - - subject: New login screen - status: :default_status_in_specification - type: :default_type_user_story - version: Product Backlog - position: 3 - - subject: Password reset does not send email - status: :default_status_confirmed - type: :default_type_bug - version: Bug Backlog - position: 1 - - subject: New website - status: :default_status_new - type: :default_type_epic - start: 26 - duration: 0 - children: - - subject: Newsletter registration form - status: :default_status_new - type: :default_type_user_story - version: Product Backlog - position: 6 - - subject: Implement product tour - status: :default_status_new - type: :default_type_user_story - version: Product Backlog - position: 4 - - subject: New landing page - status: :default_status_specified - type: :default_type_user_story - version: Sprint 1 - position: 2 - story_points: 3 - start: 26 - duration: 0 - children: - - subject: Create wireframes for new landing page - status: :default_status_in_progress - type: :default_type_task - version: Sprint 1 - start: 26 - duration: 0 - - subject: Contact form - status: :default_status_specified - type: :default_type_user_story - version: Sprint 1 - position: 5 - start: 21 - duration: 0 - story_points: 1 - - subject: Feature carousel - status: :default_status_specified - type: :default_type_user_story - version: Sprint 1 - position: 3 - story_points: 5 - children: - - subject: Make screenshots for feature tour - status: :default_status_closed - type: :default_type_task - version: Sprint 1 - - subject: Wrong hover color - status: :default_status_confirmed - type: :default_type_bug - version: Sprint 1 - position: 4 - story_points: 1 - start: 21 - duration: 0 - - subject: SSL certificate - status: :default_status_specified - type: :default_type_user_story - version: Product Backlog - position: 1 - start: 22 - duration: 1 - - subject: Set-up Staging environment - status: :default_status_in_specification - type: :default_type_user_story - version: Product Backlog - position: 2 - start: 23 - duration: 0 - - subject: Choose a content management system - status: :default_status_specified - type: :default_type_user_story - version: Product Backlog - position: 7 - start: 24 - duration: 1 - - subject: Website navigation structure - status: :default_status_specified - type: :default_type_user_story - version: Sprint 1 - position: 7 - story_points: 3 - start: 25 - duration: 0 - children: - - subject: Set up navigation concept for website. - status: :default_status_new - type: :default_type_task - version: Sprint 1 - start: 25 - duration: 0 - - subject: Internal link structure - status: :default_status_new - type: :default_type_user_story - version: Product Backlog - position: 5 - start: 25 - duration: 0 - - subject: Develop v1.0 - status: :default_status_new - type: :default_type_phase - start: 14 - duration: 3 - - subject: Release v1.0 - status: :default_status_new - type: :default_type_milestone - start: 18 - duration: 0 - relations: - - to: Develop v1.0 - type: follows - - subject: Develop v1.1 - status: :default_status_new - type: :default_type_phase - start: 21 - duration: 3 - - subject: Release v1.1 - status: :default_status_new - type: :default_type_milestone - start: 25 - duration: 0 - relations: - - to: Develop v1.1 - type: follows - - subject: Develop v2.0 - status: :default_status_new - type: :default_type_phase - start: 28 - duration: 3 - - subject: Release v2.0 - status: :default_status_new - type: :default_type_milestone - start: 32 - duration: 0 - relations: - - to: Develop v2.0 - type: follows - wiki: | - ### Sprint planning meeting - - _Please document here topics to the Sprint planning meeting_ - - * Time boxed (8 h) - * Input: Product Backlog - * Output: Sprint Backlog - - * Divided into two additional time boxes of 4 h: - - * The Product Owner presents the team the [Product Backlog](%{base_url}/projects/your-scrum-project/backlogs) and the priorities and explanes the Sprint Goal, to which the team must agree. Together, they prioritize the topics from the Product Backlog which the team will take care of in the next sprint. The team committs to the discussed delivery. - * The team plans autonomously (without the Product Owner) in detail and breaks down the tasks from the discussed requirements to consolidate a [Sprint Backlog](%{base_url}/projects/your-scrum-project/backlogs). - - - ### Daily Scrum meeting - - _Please document here topics to the Daily Scrum meeting_ - - * Short, daily status meeting of the team. - * Time boxed (max. 15 min). - * Stand-up meeting to discuss the following topics from the Task board. - * What do I plan to do until the next Daily Scrum? - * What has blocked my work (Impediments)? - * Scrum Master moderates and notes down Sprint Impediments. - * Product Owner may participate may participate in order to stay informed. - - ### Sprint Review meeting - - _Please document here topcis to the Sprint Review meeting_ - - * Time boxed (4 h). - * A maximum of one hour of preparation time per person. - * The team shows the product owner and other interested persons what has been achieved in this sprint. - * Important: no dummies and no PowerPoint! Just finished product functionality (Increments) should be demonstrated. - * Feedback from Product Owner, stakeholders and others is desired and will be included in further work. - * Based on the demonstrated functionalities, the Product Owner decides to go live with this increment or to develop it further. This possibility allows an early ROI. - - - ### Sprint Retrospective - - _Please document here topcis to the Sprint Retrospective meeting_ - - * Time boxed (3 h). - * After Sprint Review, will be moderated by Scrum Master. - * The team discusses the sprint: what went well, what needs to be improved to be more productive for the next sprint or even have more fun. diff --git a/frontend/src/app/components/wp-card-view/wp-card-view.component.sass b/frontend/src/app/components/wp-card-view/wp-card-view.component.sass index 7ca826c51a..3a1af82a82 100644 --- a/frontend/src/app/components/wp-card-view/wp-card-view.component.sass +++ b/frontend/src/app/components/wp-card-view/wp-card-view.component.sass @@ -13,7 +13,6 @@ .wp-card user-select: none width: 100% - max-width: 250px border: 1px solid var(--widget-box-block-border-color) border-radius: 5px padding: 10px 30px 10px 10px diff --git a/frontend/src/app/modules/boards/board/board-list/board-list.component.html b/frontend/src/app/modules/boards/board/board-list/board-list.component.html index 4b53ef6cf6..75351af435 100644 --- a/frontend/src/app/modules/boards/board/board-list/board-list.component.html +++ b/frontend/src/app/modules/boards/board/board-list/board-list.component.html @@ -14,6 +14,7 @@ [inFlight]="inFlight" (onSave)="renameQuery(query, $event)" [editable]="!!query.updateImmediately" + [initialFocus]="isInitiallyFocused()" class="-small"> - diff --git a/frontend/src/app/modules/common/editable-toolbar-title/editable-toolbar-title.component.ts b/frontend/src/app/modules/common/editable-toolbar-title/editable-toolbar-title.component.ts index 2e47add5ec..14ce593364 100644 --- a/frontend/src/app/modules/common/editable-toolbar-title/editable-toolbar-title.component.ts +++ b/frontend/src/app/modules/common/editable-toolbar-title/editable-toolbar-title.component.ts @@ -106,10 +106,6 @@ export class EditableToolbarTitleComponent implements OnInit, OnChanges { } } - public selectInput(event:FocusEvent) { - (event.target as HTMLInputElement).select(); - } - public saveWhenFocusOutside($event:FocusEvent) { ContainHelpers.whenOutside(this.elementRef.nativeElement, () => this.save($event)); } diff --git a/frontend/src/app/modules/common/editable-toolbar-title/editable-toolbar-title.html b/frontend/src/app/modules/common/editable-toolbar-title/editable-toolbar-title.html index 755b2e0fd0..ad1c08e92b 100644 --- a/frontend/src/app/modules/common/editable-toolbar-title/editable-toolbar-title.html +++ b/frontend/src/app/modules/common/editable-toolbar-title/editable-toolbar-title.html @@ -14,7 +14,6 @@ aria-required="true" [attr.name]="selectableTitleIdentifier" [focus]="this.initialFocus || undefined" - (focus)="selectInput($event)" (keydown.escape)="reset($event)" (keydown.enter)="save($event)" [attr.placeholder]="text.input_placeholder" diff --git a/lib/open_project/configuration.rb b/lib/open_project/configuration.rb index 8fb8e04af8..d84f4a363c 100644 --- a/lib/open_project/configuration.rb +++ b/lib/open_project/configuration.rb @@ -37,7 +37,8 @@ module OpenProject # Configuration default values @defaults = { - 'attachments_storage' => 'file', + 'edition' => 'standard', + 'attachments_storage' => 'file', 'attachments_storage_path' => nil, 'attachments_grace_period' => 180, 'autologin_cookie_name' => 'autologin', diff --git a/lib/open_project/design.rb b/lib/open_project/design.rb index f606ec76f7..729313d938 100644 --- a/lib/open_project/design.rb +++ b/lib/open_project/design.rb @@ -86,7 +86,6 @@ module OpenProject 'main-menu-item-height' => "40px", 'main-menu-item-border-color' => "$primary-color", 'main-menu-item-border-width' => "1px", - 'main-menu-enable-toggle-highlighting' => "false", 'main-menu-bg-color' => "#333739", 'main-menu-bg-selected-background' => "#175A8E", 'main-menu-bg-hover-background' => "#124E7C", diff --git a/modules/backlogs/app/seeders/type_seeder.rb b/modules/backlogs/app/seeders/type_seeder.rb index 23009f1258..d3a5a1cac1 100644 --- a/modules/backlogs/app/seeders/type_seeder.rb +++ b/modules/backlogs/app/seeders/type_seeder.rb @@ -1,23 +1,25 @@ -module BasicData - module Backlogs - module TypeSeeder - def coded_visibility_table - super.merge backlogs_visibility_table - end +module StandardSeeder + module BasicData + module Backlogs + module TypeSeeder + def coded_visibility_table + super.merge backlogs_visibility_table + end - ## - # Relies on type names in the core TypeSeeder being (in this order) - # task, milestone, phase, feature, epic, user_story, bug - # and 0 to 2 being mapped to - # hidden, default, visible - def backlogs_visibility_table - { - story_points: [0, 0, 0, 1, 2, 2, 1], - remaining_time: [1, 0, 0, 1, 1, 1, 1] - } + ## + # Relies on type names in the core TypeSeeder being (in this order) + # task, milestone, phase, feature, epic, user_story, bug + # and 0 to 2 being mapped to + # hidden, default, visible + def backlogs_visibility_table + { + story_points: [0, 0, 0, 1, 2, 2, 1], + remaining_time: [1, 0, 0, 1, 1, 1, 1] + } + end end - end - BasicData::TypeSeeder.prepend BasicData::Backlogs::TypeSeeder + StandardSeeder::BasicData::TypeSeeder.prepend StandardSeeder::BasicData::Backlogs::TypeSeeder + end end end diff --git a/modules/backlogs/lib/open_project/backlogs/patches/project_seeder_patch.rb b/modules/backlogs/lib/open_project/backlogs/patches/project_seeder_patch.rb index cbd1b1a772..da1d6abd4b 100644 --- a/modules/backlogs/lib/open_project/backlogs/patches/project_seeder_patch.rb +++ b/modules/backlogs/lib/open_project/backlogs/patches/project_seeder_patch.rb @@ -42,7 +42,9 @@ module OpenProject::Backlogs::Patches::ProjectSeederPatch def seed_versions(project, key) super - versions = Array(I18n.t("seeders.demo_data.projects.#{key}")[:versions]) + return unless project_has_data_for?(key, 'versions') + + versions = Array(project_data_for(key, 'versions')) .map { |data| Version.find_by(name: data[:name]) } .compact diff --git a/modules/bim_seeder/CHANGELOG.md b/modules/bim_seeder/CHANGELOG.md new file mode 100644 index 0000000000..d42ecdd756 --- /dev/null +++ b/modules/bim_seeder/CHANGELOG.md @@ -0,0 +1,19 @@ + + +# Changelog + +* `#29280` Create module for seeding BIM data diff --git a/modules/bim_seeder/README.md b/modules/bim_seeder/README.md new file mode 100644 index 0000000000..fb80c7129b --- /dev/null +++ b/modules/bim_seeder/README.md @@ -0,0 +1,7 @@ +# OpenProject Bim Seeder Plugin + +Seeds basic data and demo projects for the OpenProject BIM edition. + +## Issue Tracker + +https://community.openproject.org/projects/bim-seeder/work_packages diff --git a/modules/bim_seeder/app/assets/images/bim_seeder/logo_openproject_bim_big.png b/modules/bim_seeder/app/assets/images/bim_seeder/logo_openproject_bim_big.png new file mode 100644 index 0000000000..ea3085f04d Binary files /dev/null and b/modules/bim_seeder/app/assets/images/bim_seeder/logo_openproject_bim_big.png differ diff --git a/modules/bim_seeder/app/seeders/bim_seeder/basic_data/activity_seeder.rb b/modules/bim_seeder/app/seeders/bim_seeder/basic_data/activity_seeder.rb new file mode 100644 index 0000000000..f7ce8ceb00 --- /dev/null +++ b/modules/bim_seeder/app/seeders/bim_seeder/basic_data/activity_seeder.rb @@ -0,0 +1,43 @@ +#-- encoding: UTF-8 + +#-- copyright + +# OpenProject is a project management system. +# Copyright (C) 2012-2018 the OpenProject Foundation (OPF) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2017 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +module BimSeeder + module BasicData + class ActivitySeeder < ::BasicData::ActivitySeeder + def data + [ + { name: I18n.t(:default_activity_management), position: 1, is_default: true }, + { name: I18n.t(:default_activity_specification), position: 2, is_default: false }, + { name: I18n.t(:default_activity_other), position: 3, is_default: false } + ] + end + end + end +end diff --git a/modules/bim_seeder/app/seeders/bim_seeder/basic_data/status_seeder.rb b/modules/bim_seeder/app/seeders/bim_seeder/basic_data/status_seeder.rb new file mode 100644 index 0000000000..131673e13c --- /dev/null +++ b/modules/bim_seeder/app/seeders/bim_seeder/basic_data/status_seeder.rb @@ -0,0 +1,78 @@ +#-- encoding: UTF-8 + +#-- copyright + +# OpenProject is a project management system. +# Copyright (C) 2012-2018 the OpenProject Foundation (OPF) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2017 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +module BimSeeder + module BasicData + class StatusSeeder < ::BasicData::StatusSeeder + def data + color_names = [ + 'teal-1', # new + 'indigo-1', # in specification + 'teal-3', # specified + 'red-6', # confirmed + 'yellow-2', # tbs + 'lime-2', # scheduled + 'cyan-3', # in progress + 'cyan-3', # in development + 'teal-6', # developed + 'teal-7', # in testing + 'teal-9', # tested + 'red-9', # test_failed + 'gray-3', # closed + 'orange-3', # on hold + 'red-3', # rejected + ] + + # When selecting for an array of values, implicit order is applied + # so we need to restore values by their name. + colors_by_name = Color.where(name: color_names).index_by(&:name) + colors = color_names.collect { |name| colors_by_name[name].id } + + [ + { name: I18n.t(:default_status_new), color_id: colors[0], is_closed: false, is_default: true, position: 1 }, + { name: I18n.t(:default_status_in_specification), color_id: colors[1], is_closed: false, is_default: false, position: 2 }, + { name: I18n.t(:default_status_specified), color_id: colors[2], is_closed: false, is_default: false, position: 3 }, + { name: I18n.t(:default_status_confirmed), color_id: colors[3], is_closed: false, is_default: false, position: 4 }, + { name: I18n.t(:default_status_to_be_scheduled), color_id: colors[4], is_closed: false, is_default: false, position: 5 }, + { name: I18n.t(:default_status_scheduled), color_id: colors[5], is_closed: false, is_default: false, position: 6 }, + { name: I18n.t(:default_status_in_progress), color_id: colors[6], is_closed: false, is_default: false, position: 7 }, + { name: I18n.t(:default_status_in_development), color_id: colors[7], is_closed: false, is_default: false, position: 8 }, + { name: I18n.t(:default_status_developed), color_id: colors[8], is_closed: false, is_default: false, position: 9 }, + { name: I18n.t(:default_status_in_testing), color_id: colors[9], is_closed: false, is_default: false, position: 10 }, + { name: I18n.t(:default_status_tested), color_id: colors[10], is_closed: false, is_default: false, position: 11 }, + { name: I18n.t(:default_status_test_failed), color_id: colors[11], is_closed: false, is_default: false, position: 12 }, + { name: I18n.t(:default_status_closed), color_id: colors[12], is_closed: true, is_default: false, position: 13 }, + { name: I18n.t(:default_status_on_hold), color_id: colors[13], is_closed: false, is_default: false, position: 14 }, + { name: I18n.t(:default_status_rejected), color_id: colors[14], is_closed: true, is_default: false, position: 15 } + ] + end + end + end +end diff --git a/modules/bim_seeder/app/seeders/bim_seeder/basic_data/type_seeder.rb b/modules/bim_seeder/app/seeders/bim_seeder/basic_data/type_seeder.rb new file mode 100644 index 0000000000..fe6d04e406 --- /dev/null +++ b/modules/bim_seeder/app/seeders/bim_seeder/basic_data/type_seeder.rb @@ -0,0 +1,50 @@ +#-- encoding: UTF-8 + +#-- copyright + +# OpenProject is a project management system. +# Copyright (C) 2012-2018 the OpenProject Foundation (OPF) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2017 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +module BimSeeder + module BasicData + class TypeSeeder < ::BasicData::TypeSeeder + def type_names + %i[task milestone phase building_model defect approval] + end + + 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], + building_model: [4, true, :default_color_blue, true, false, 'seeders.bim.default_type_building_model'], + defect: [5, true, :default_color_red, true, false, 'seeders.bim.default_type_defect'], + approval: [6, true, :default_color_grey_dark, true, false, 'seeders.bim.default_type_approval'] + } + end + end + end +end diff --git a/modules/bim_seeder/app/seeders/bim_seeder/basic_data/workflow_seeder.rb b/modules/bim_seeder/app/seeders/bim_seeder/basic_data/workflow_seeder.rb new file mode 100644 index 0000000000..c9065431ff --- /dev/null +++ b/modules/bim_seeder/app/seeders/bim_seeder/basic_data/workflow_seeder.rb @@ -0,0 +1,72 @@ +#-- encoding: UTF-8 + +#-- copyright + +# OpenProject is a project management system. +# Copyright (C) 2012-2018 the OpenProject Foundation (OPF) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2017 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +module BimSeeder + module BasicData + class WorkflowSeeder < ::BasicData::WorkflowSeeder + def workflows + types = Type.all + types = types.map { |t| { t.name => t.id } }.reduce({}, :merge) + + new = Status.find_by(name: I18n.t(:default_status_new)) + in_specification = Status.find_by(name: I18n.t(:default_status_in_specification)) + specified = Status.find_by(name: I18n.t(:default_status_specified)) + to_be_scheduled = Status.find_by(name: I18n.t(:default_status_to_be_scheduled)) + scheduled = Status.find_by(name: I18n.t(:default_status_scheduled)) + in_progress = Status.find_by(name: I18n.t(:default_status_in_progress)) + in_development = Status.find_by(name: I18n.t(:default_status_in_development)) + developed = Status.find_by(name: I18n.t(:default_status_developed)) + in_testing = Status.find_by(name: I18n.t(:default_status_in_testing)) + tested = Status.find_by(name: I18n.t(:default_status_tested)) + test_failed = Status.find_by(name: I18n.t(:default_status_test_failed)) + closed = Status.find_by(name: I18n.t(:default_status_closed)) + on_hold = Status.find_by(name: I18n.t(:default_status_on_hold)) + rejected = Status.find_by(name: I18n.t(:default_status_rejected)) + + { + types[I18n.t(:default_type_task)] => [new, in_progress, on_hold, rejected, closed], + types[I18n.t(:default_type_milestone)] => [new, to_be_scheduled, scheduled, in_progress, on_hold, rejected, closed], + types[I18n.t(:default_type_phase)] => [new, to_be_scheduled, scheduled, in_progress, on_hold, rejected, closed], + types[I18n.t('seeders.bim.default_type_building_model')] => [new, in_specification, specified, in_development, developed, in_testing, tested, test_failed, on_hold, rejected, closed], + types[I18n.t('seeders.bim.default_type_defect')] => [new, in_specification, specified, in_development, developed, in_testing, tested, test_failed, on_hold, rejected, closed], + types[I18n.t('seeders.bim.default_type_approval')] => [new, in_specification, specified, in_development, developed, in_testing, tested, test_failed, on_hold, rejected, closed] + } + end + + def type_seeder_class + ::BimSeeder::BasicData::TypeSeeder + end + + def status_seeder_class + ::BimSeeder::BasicData::StatusSeeder + end + end + end +end diff --git a/modules/bim_seeder/app/seeders/bim_seeder/basic_data_seeder.rb b/modules/bim_seeder/app/seeders/bim_seeder/basic_data_seeder.rb new file mode 100644 index 0000000000..d7c1ce30e8 --- /dev/null +++ b/modules/bim_seeder/app/seeders/bim_seeder/basic_data_seeder.rb @@ -0,0 +1,46 @@ +#-- encoding: UTF-8 + +#-- copyright + +# OpenProject is a project management system. +# Copyright (C) 2012-2018 the OpenProject Foundation (OPF) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2017 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +module BimSeeder + class BasicDataSeeder < ::BasicDataSeeder + def data_seeder_classes + [ + ::BasicData::BuiltinRolesSeeder, + ::BasicData::RoleSeeder, + ::BimSeeder::BasicData::ActivitySeeder, + ::BasicData::ColorSeeder, + ::BasicData::ColorSchemeSeeder, + ::BimSeeder::BasicData::WorkflowSeeder, + ::BasicData::PrioritySeeder, + ::BasicData::SettingSeeder + ] + end + end +end diff --git a/modules/bim_seeder/bin/rails b/modules/bim_seeder/bin/rails new file mode 100644 index 0000000000..3a757e143c --- /dev/null +++ b/modules/bim_seeder/bin/rails @@ -0,0 +1,26 @@ +#!/usr/bin/env ruby +# This command will automatically be run when you run "rails" with Rails gems +# installed from the root of your application. + +ENGINE_ROOT = File.expand_path('../..', __FILE__) +ENGINE_PATH = File.expand_path('../../lib/open_project/bim_seeder/engine', __FILE__) + +# Set up gems listed in the Gemfile. +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) + +## +# This is not ideal but better than nothing. +if ENV['OPENPROJECT_ROOT'] + # /Users/mkahl/dev/openproject/release/lib + path = Pathname(ENV["OPENPROJECT_ROOT"]).join("lib") + $LOAD_PATH.unshift(path.to_s) +else + puts + puts "Error: please define OPENPROJECT_ROOT pointing to your OpenProject core's root directory" + puts + Kernel.exit(1) +end + +require 'rails/all' +require 'rails/engine/commands' diff --git a/modules/bim_seeder/config/locales/en.seeders.bim.yml b/modules/bim_seeder/config/locales/en.seeders.bim.yml new file mode 100644 index 0000000000..900df21a27 --- /dev/null +++ b/modules/bim_seeder/config/locales/en.seeders.bim.yml @@ -0,0 +1,385 @@ +#-- copyright +# OpenProject is a project management system. +# Copyright (C) 2012-2018 the OpenProject Foundation (OPF) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2017 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +en: + seeders: + bim: + default_type_building_model: Building model + default_type_defect: Defect + default_type_approval: Approval + demo_data: + welcome: + title: "Welcome to OpenProject BIM Edition!" + text: | + Checkout the demo project to get started with some demo data we have prepared for you. + + * [Demo project](%{base_url}/projects/demo-project): to get an overview about classical project management. + + Also, you can create a blank [new project](%{base_url}/projects/new). + + Never stop collaborating. With open source and open mind. + + You can change this welcome text [here](%{base_url}/settings). + projects: + demo-project: + name: Demo project + identifier: demo-project + description: > + **This is a demo project**. You can edit the description in + the [Project settings -> Description](%{base_url}/projects/demo-project/settings). + timeline: + name: Timeline + modules: + - work_package_tracking + - news + - wiki + news: + - title: Welcome to your demo project + summary: > + We are glad you joined. + In this module you can communicate project news to your team members. + description: The actual news + types: + - :default_type_task + - :default_type_milestone + - :default_type_phase + - 'seeders.bim.default_type_building_model' + - 'seeders.bim.default_type_defect' + - 'seeders.bim.default_type_approval' + categories: + - Category 1 (to be changed in Project settings) + queries: + - name: Defects + status: open + type: 'seeders.bim.default_type_defect' + - name: Project plan + status: open + timeline: true + sort_by: id + hierarchy: true + - name: Milestones + status: open + type: :default_type_milestone + timeline: true + columns: + - id + - type + - status + - subject + - start_date + - due_date + sort_by: id + - name: Tasks + status: open + type: :default_type_task + hierarchy: true + sort_by: id + columns: + - id + - subject + - priority + - type + - status + - assigned_to + work_packages: + - subject: Project kick-off + description: Plan and execute the project kick-off. + status: :default_status_scheduled + type: :default_type_milestone + priority: :default_priority_high + estimated_hours: 8 + start: 4 + duration: 0 + done_ratio: 50 + - subject: Project planning + description: | + Please execute the related tasks: + + * ##child:1 + * ##child:2 + * ##child:3 + * ##child:4 + * ##child:5 + * ##child:6 + * ##child:7 + status: :default_status_scheduled + type: :default_type_phase + priority: :default_priority_high + estimated_hours: 8 + start: 0 + duration: 3 + children: + - subject: Create a new project + description: | + Please [create a new project](%{base_url}/projects/new) from the project drop down menu in the left hand header navigation. + + **You can:** + * give your project a name, + * add a project description, + * create a project structure, + * set a project to public. + + **Visuals:** + ![new project](##attachment:"new_project.jpg") + + **Find out more:** + * https://www.openproject.org/help/administration/manage-projects/ + status: :default_status_new + type: :default_type_task + start: 0 + duration: 0 + attachments: + - new_project.jpg + - subject: Customize project overview page + description: | + You can [customize your project overview page](%{base_url}/my_projects_overview/demo-project/page_layout) to add important information, such as project description, important links, work packages overview, news, and much more. + + **You can:** + * edit the project overview by clicking on the gear icon, + * add a project description, + * add links to important project information or custom reports, + * insert news or work packages, + * and much more. + + **Visuals:** + ![project overview](##attachment:"project_overview.jpg") + + **Find out more:** + * https://www.openproject.org/help/project-setup/ + status: :default_status_new + type: :default_type_task + start: 0 + duration: 0 + attachments: + - project_overview.jpg + - subject: Activate further modules + description: | + Please activate further [Modules](%{base_url}/projects/demo-project/settings/modules) in the Project settings in order to have more features in your project. + + **You can:** + * add a Scrum module (Backlogs), + * add time tracking, reporting, and budgets (Time Tracking, Cost Reports, Budgets), + * add a wiki, + * add meetings, + * and more. + + **Visuals:** + ![project modules](##attachment:"project_modules.jpg") + + **Find out more:** + * https://www.openproject.org/help/activate-deactivate-modules/ + status: :default_status_new + type: :default_type_task + start: 0 + duration: 0 + attachments: + - project_modules.jpg + - subject: Invite new team members + description: | + Please invite new team members by going to [Members](%{base_url}/projects/demo-project/members) in the project navigation. + + **You can:** + * add existing users to a project by typing in their names, + * invite new users to OpenProject by typing in their email address, + * assign a certain role in this project for each user. + + **Visuals:** + ![project members](##attachment:"project_members.jpg") + + **Find out more:** + * https://www.openproject.org/help/add-project-members/ + status: :default_status_new + type: :default_type_task + start: 1 + duration: 1 + priority: :default_priority_high + attachments: + - project_members.jpg + - subject: Create work packages + description: | + Please create work packages for your project. Go to [Work package](%{base_url}/projects/demo-project/work_packages) and click the green +Create button. + + **You can**: + * create any type of work, e.g. features, tasks, bugs, risks, ideas, + * add a title and description, + * add attachments via copy and paste to the description, + * set status, priority and assign it to a team member, + * insert any custom field to the forms. + + **Visuals**: + ![create work package](##attachment:"create_work_package.jpg") + + **Find out more**: + * https://www.openproject.org/help/work-packages/create-new-work-package/ + status: :default_status_new + type: :default_type_task + start: 1 + duration: 1 + priority: :default_priority_high + attachments: + - create_work_package.jpg + - subject: Create a project plan + description: | + Please create a project plan by going to [Project plan](##query:"Project plan") in the project navigation. + + **You can:** + * create new phases and milestones by simply clicking in the project plan, + * change phases and milestones with drag and drop, + * add labels, such as start and finish date, title, or assignee, + * add dependencies by right clicking on a phase or milestone and choose pre-decessor or follower, + * custom columns, group, filter and save timeline reports to have them at your fingertips. + + **Visuals:** + ![gantt chart](##attachment:"gantt_chart.jpg") + + **Find out more:** + * https://www.openproject.org/help/timelines/integrated-timeline-work-package-page/ + status: :default_status_new + type: :default_type_task + start: 2 + duration: 1 + priority: :default_priority_high + attachments: + - gantt_chart.jpg + - subject: Edit a work package + description: | + [Edit a work package](%{base_url}/projects/demo-project/work_packages/41/activity) by double clicking on a row in the list view or open the split screen with the "i". + + **You can**: + * change title or description, + * assign it to a team member, + * comment on topics or notify team members with @-notifications, + * set status, priority, finish dates or other custom fields, + * include documents or screenshots with copy & paste, + * add relations to other work packages, + * change forms in the Administration settings. + + **Visuals**: + ![edit work package](##attachment:"edit_work_package.jpg") + + **Find out more**: + * https://www.openproject.org/help/work-packages/ + status: :default_status_new + type: :default_type_task + start: 3 + duration: 0 + priority: :default_priority_high + attachments: + - edit_work_package.jpg + - subject: Develop v1.0 + status: :default_status_scheduled + type: :default_type_phase + start: 7 + duration: 17 + children: + - subject: Great feature + status: :default_status_developed + type: 'seeders.bim.default_type_building_model' + start: 7 + duration: 8 + - subject: Best feature + status: :default_status_specified + type: 'seeders.bim.default_type_building_model' + start: 16 + duration: 5 + relations: + - to: Great feature + type: follows + - subject: Terrible bug + status: :default_status_confirmed + type: 'seeders.bim.default_type_defect' + start: 22 + duration: 2 + relations: + - to: Best feature + type: follows + - subject: Go-Live v1.0 + status: :default_status_scheduled + type: :default_type_milestone + start: 25 + duration: 0 + relations: + - to: Develop v1.0 + type: follows + - subject: Develop v1.1 + status: :default_status_scheduled + type: :default_type_phase + start: 28 + duration: 2 + children: + - subject: Wonderful feature + status: :default_status_new + type: 'seeders.bim.default_type_building_model' + start: 28 + duration: 1 + - subject: Ugly bug + status: :default_status_new + type: 'seeders.bim.default_type_defect' + start: 30 + duration: 1 + relations: + - to: Wonderful feature + type: follows + - subject: Go-Live v1.1 + status: :default_status_to_be_scheduled + type: :default_type_milestone + start: 32 + duration: 0 + relations: + - to: Develop v1.1 + type: follows + wiki: + - title: Wiki + content: | + In this wiki you can collaboratively create and edit pages and sub-pages to create a project wiki. + + **You can:** + + * insert text and format it with the toolbar, + * insert text and images with copy and paste, + * paste formatted text directly from MSOffice documents, + * create a page hierarchy by inserting parent pages, + * use makros to include, e.g. table of contents, work packages lists or Gantt charts, + * include wiki pages in other text fields, e.g. project overview or meetings, + * reference tickets with one, two or three "#"+ticket number, depending on what information should be displayed, + * include links to other documents, + * view the change history, + * view as Mardown. + + **More information:** + https://www.openproject.org/help/wiki/ + children: + - title: Project documentation + content: | + This is a sub-page of the wiki. You can change this by editing the Parent page (Click the _EDIT_ button and see bottom of the page). + + ## Project scope + + ## Deliverables + children: + - title: Project manual + content: '' diff --git a/modules/bim_seeder/lib/open_project/bim_seeder.rb b/modules/bim_seeder/lib/open_project/bim_seeder.rb new file mode 100644 index 0000000000..0bcf3c7742 --- /dev/null +++ b/modules/bim_seeder/lib/open_project/bim_seeder.rb @@ -0,0 +1,9 @@ +module OpenProject + module BimSeeder + require "open_project/bim_seeder/engine" + + # The DesignPatch is not a typical method patch, as it replaces a constant and thus needs to be applied without the + # standard patch logic for plugins. + require "open_project/bim_seeder/patches/design_patch" + end +end diff --git a/modules/bim_seeder/lib/open_project/bim_seeder/engine.rb b/modules/bim_seeder/lib/open_project/bim_seeder/engine.rb new file mode 100644 index 0000000000..643adffc9f --- /dev/null +++ b/modules/bim_seeder/lib/open_project/bim_seeder/engine.rb @@ -0,0 +1,17 @@ +# Prevent load-order problems in case openproject-plugins is listed after a plugin in the Gemfile +# or not at all +require 'open_project/plugins' + +module OpenProject::BimSeeder + class Engine < ::Rails::Engine + engine_name :bim_seeder + + include OpenProject::Plugins::ActsAsOpEngine + + register 'openproject-bim_seeder', + :author_url => 'https://openproject.org', + :requires_openproject => '>= 9.0.0' + + patches [:RootSeeder] + end +end diff --git a/modules/bim_seeder/lib/open_project/bim_seeder/patches/design_patch.rb b/modules/bim_seeder/lib/open_project/bim_seeder/patches/design_patch.rb new file mode 100644 index 0000000000..f503d65f9a --- /dev/null +++ b/modules/bim_seeder/lib/open_project/bim_seeder/patches/design_patch.rb @@ -0,0 +1,23 @@ +require 'open_project/design' + +module OpenProject::BimSeeder + module Patches + module DesignPatch + DEFAULTS = OpenProject::Design::DEFAULTS.merge( + { + 'primary-color' => "#748EA8", + 'primary-color-dark' => "#566484", + 'header-bg-color' => "#566484", + 'header-item-bg-hover-color' => "#748EA8", + 'main-menu-bg-color' => "#333739", + 'main-menu-bg-selected-background' => "#748EA8", + 'main-menu-bg-hover-background' => "#566484", + 'header-home-link-bg' => '#{image-url("bim_seeder/logo_openproject_bim_big.png") no-repeat 20px 0}' + } + ).freeze + end + end +end + +OpenProject::Design.send(:remove_const, 'DEFAULTS') +OpenProject::Design.const_set('DEFAULTS', OpenProject::BimSeeder::Patches::DesignPatch::DEFAULTS) diff --git a/modules/bim_seeder/lib/open_project/bim_seeder/patches/root_seeder_patch.rb b/modules/bim_seeder/lib/open_project/bim_seeder/patches/root_seeder_patch.rb new file mode 100644 index 0000000000..46d42bf102 --- /dev/null +++ b/modules/bim_seeder/lib/open_project/bim_seeder/patches/root_seeder_patch.rb @@ -0,0 +1,11 @@ +module OpenProject::BimSeeder::Patches::RootSeederPatch + def self.included(base) # :nodoc: + base.prepend InstanceMethods + end + + module InstanceMethods + def seed_basic_data + ::BimSeeder::BasicDataSeeder.new.seed! + end + end +end diff --git a/modules/bim_seeder/lib/openproject-bim_seeder.rb b/modules/bim_seeder/lib/openproject-bim_seeder.rb new file mode 100644 index 0000000000..25615aae8f --- /dev/null +++ b/modules/bim_seeder/lib/openproject-bim_seeder.rb @@ -0,0 +1 @@ +require 'open_project/bim_seeder' diff --git a/modules/bim_seeder/openproject-bim_seeder.gemspec b/modules/bim_seeder/openproject-bim_seeder.gemspec new file mode 100644 index 0000000000..a278d0579b --- /dev/null +++ b/modules/bim_seeder/openproject-bim_seeder.gemspec @@ -0,0 +1,18 @@ +# encoding: UTF-8 +$:.push File.expand_path("../lib", __FILE__) +$:.push File.expand_path("../../lib", __dir__) + + +# Describe your gem and declare its dependencies: +Gem::Specification.new do |s| + s.name = "openproject-bim_seeder" + + s.authors = "OpenProject GmbH" + s.email = "info@openproject.org" + s.homepage = "https://community.openproject.org/projects/openproject-bim-seeder" # TODO check this URL + s.summary = 'OpenProject BIM Seeder' + s.license = "GPLv3" + s.version = "1.0.0" + + s.files = Dir["{app,lib,config}/**/*"] + %w(CHANGELOG.md README.md) +end diff --git a/modules/bim_seeder/spec/seeders/demo_data_seeder_spec.rb b/modules/bim_seeder/spec/seeders/demo_data_seeder_spec.rb new file mode 100644 index 0000000000..3f56411ca0 --- /dev/null +++ b/modules/bim_seeder/spec/seeders/demo_data_seeder_spec.rb @@ -0,0 +1,68 @@ +#-- encoding: UTF-8 + +#-- copyright + +# OpenProject is a project management system. +# Copyright (C) 2012-2018 the OpenProject Foundation (OPF) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2017 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +require 'spec_helper' + +def translate_with_base_url(string) + I18n.t(string, deep_interpolation: true, base_url: OpenProject::Configuration.rails_relative_url_root) +end + +describe 'seeds' do + before do + allow(OpenProject::Configuration).to receive(:[]).and_call_original + allow(OpenProject::Configuration).to receive(:[]).with('edition').and_return(edition) + end + + context 'BIM edition' do + let(:edition) { 'bim' } + + it 'create the demo data' do + perform_deliveries = ActionMailer::Base.perform_deliveries + ActionMailer::Base.perform_deliveries = false + + begin + # Avoid asynchronous DeliverWorkPackageCreatedJob + Delayed::Worker.delay_jobs = false + expect { BimSeeder::BasicDataSeeder.new.seed! }.not_to raise_error + expect { AdminUserSeeder.new.seed! }.not_to raise_error + expect { DemoDataSeeder.new.seed! }.not_to raise_error + + expect(User.where(admin: true).count).to eq 1 + expect(Project.count).to eq 1 + expect(WorkPackage.count).to eq 18 + expect(Wiki.count).to eq 1 + expect(Query.count).to eq 4 + ensure + ActionMailer::Base.perform_deliveries = perform_deliveries + end + end + end +end diff --git a/modules/boards/spec/features/support/board_index_page.rb b/modules/boards/spec/features/support/board_index_page.rb index 815bb7830e..6d5412d8ae 100644 --- a/modules/boards/spec/features/support/board_index_page.rb +++ b/modules/boards/spec/features/support/board_index_page.rb @@ -62,7 +62,6 @@ module Pages if action == nil find('.button', text: 'Free board').click else - select action.to_s, from: 'new_board_action_select' find('.button', text: 'Action board').click end diff --git a/modules/my_project_page/app/seeders/my_projects_overview_seeder.rb b/modules/my_project_page/app/seeders/my_projects_overview_seeder.rb index 1eeef927b2..59e50c1b2d 100644 --- a/modules/my_project_page/app/seeders/my_projects_overview_seeder.rb +++ b/modules/my_project_page/app/seeders/my_projects_overview_seeder.rb @@ -6,7 +6,7 @@ module DemoData def seed_data! puts "*** Seeding MyProjectsOverview" - Array(translate_with_base_url("seeders.demo_data.projects")).each do |key, project| + Array(demo_data_for('projects')).each do |key, project| puts " -Creating overview for #{project[:name]}" if config = project[:"project-overview"] @@ -35,7 +35,7 @@ module DemoData private def demo_projects_exist? - identifiers = Array(I18n.t("seeders.demo_data.projects")) + identifiers = Array(demo_data_for('projects')) .map { |_key, project| project[:identifier] } identifiers diff --git a/modules/my_project_page/config/locales/en.seeders.bim.yml b/modules/my_project_page/config/locales/en.seeders.bim.yml new file mode 100644 index 0000000000..052c746e4a --- /dev/null +++ b/modules/my_project_page/config/locales/en.seeders.bim.yml @@ -0,0 +1,65 @@ +#-- copyright +# OpenProject is a project management system. +# Copyright (C) 2012-2018 the OpenProject Foundation (OPF) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2017 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +en: + seeders: + bim: + demo_data: + projects: + demo-project: + project-overview: + top: + - id: b + title: '' + content: | + ![Teaser](##attachment:"demo_project_teaser.png") + left: + - id: a + title: Getting started + content: | + We are glad you joined! We suggest to try a few things to get started in OpenProject. + + Discover the most important features with our [Guided Tour](%{base_url}/projects/demo-project/work_packages/?start_onboarding_tour=true). + + _Try the following steps:_ + + 1. *Invite new members to your project*: → Go to [Members](%{base_url}/projects/demo-project/members) in the project navigation. + 2. *View the work in your project*: → Go to [Work packages](%{base_url}/projects/demo-project/work_packages) in the project navigation. + 3. *Create a new work package*: → Go to [Work packages → Create](%{base_url}/projects/demo-project/work_packages/new). + 4. *Create and update a project plan*: → Go to [Project plan](%{base_url}/projects/demo-project/work_packages?query_id=##query.id:"Project plan") in the project navigation. + 5. *Activate further modules*: → Go to [Project settings → Modules](%{base_url}/projects/demo-project/settings/modules). + 6. *Complete your tasks in the project*: → Go to [Work packages → Tasks](%{base_url}/projects/demo-project/work_packages/details/##wp.id:"Edit a work package"/overview?query_id=##query.id:"Tasks"). + + Here you will find our [User Guides](https://www.openproject.org/help/). + Please let us know if you have any questions or need support. Contact us: [support[at]openproject.com](mailto:support@openproject.com). + attachments: + - demo_project_teaser.png + - block: project_description + - block: work_package_tracking + right: + - members + - news_latest diff --git a/modules/my_project_page/config/locales/en.seeders.standard.yml b/modules/my_project_page/config/locales/en.seeders.standard.yml new file mode 100644 index 0000000000..d5c303f5bb --- /dev/null +++ b/modules/my_project_page/config/locales/en.seeders.standard.yml @@ -0,0 +1,99 @@ +#-- copyright +# OpenProject is a project management system. +# Copyright (C) 2012-2018 the OpenProject Foundation (OPF) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2017 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +en: + seeders: + standard: + demo_data: + projects: + demo-project: + project-overview: + top: + - id: b + title: '' + content: | + ![Teaser](##attachment:"demo_project_teaser.png") + left: + - id: a + title: Getting started + content: | + We are glad you joined! We suggest to try a few things to get started in OpenProject. + + Discover the most important features with our [Guided Tour](%{base_url}/projects/demo-project/work_packages/?start_onboarding_tour=true). + + _Try the following steps:_ + + 1. *Invite new members to your project*: → Go to [Members](%{base_url}/projects/demo-project/members) in the project navigation. + 2. *View the work in your project*: → Go to [Work packages](%{base_url}/projects/demo-project/work_packages) in the project navigation. + 3. *Create a new work package*: → Go to [Work packages → Create](%{base_url}/projects/demo-project/work_packages/new). + 4. *Create and update a project plan*: → Go to [Project plan](%{base_url}/projects/demo-project/work_packages?query_id=##query.id:"Project plan") in the project navigation. + 5. *Activate further modules*: → Go to [Project settings → Modules](%{base_url}/projects/demo-project/settings/modules). + 6. *Complete your tasks in the project*: → Go to [Work packages → Tasks](%{base_url}/projects/demo-project/work_packages/details/##wp.id:"Edit a work package"/overview?query_id=##query.id:"Tasks"). + + Here you will find our [User Guides](https://www.openproject.org/help/). + Please let us know if you have any questions or need support. Contact us: [support[at]openproject.com](mailto:support@openproject.com). + attachments: + - demo_project_teaser.png + - block: project_description + - block: work_package_tracking + right: + - members + - news_latest + scrum-project: + project-overview: + top: + - id: b + title: '' + content: | + ![Teaser](##attachment:"scrum_project_teaser.png") + left: + - id: a + title: Getting started + content: | + We are glad you joined! We suggest to try a few things to get started in OpenProject. + + Discover the most important features with our [Guided Tour](%{base_url}/projects/your-scrum-project/backlogs?start_scrum_onboarding_tour=true). + + _Try the following steps:_ + + 1. *Invite new members to your project*: → Go to [Members](%{base_url}/projects/your-scrum-project/members) in the project navigation. + 2. *View your Product backlog and Sprint backlogs*: → Go to [Backlogs](%{base_url}/projects/your-scrum-project/backlogs) in the project navigation. + 3. *View your Task board*: → Go to [Backlogs](%{base_url}/projects/your-scrum-project/backlogs) → Click on right arrow on Sprint → Select [Task Board](##sprint:"Sprint 1"). + 4. *Create a new work package*: → Go to [Work packages → Create](%{base_url}/projects/your-scrum-project/work_packages/new). + 5. *Create and update a project plan*: → Go to [Project plan](##query:"Project plan") in the project navigation. + 6. *Create a Sprint wiki*: → Go to [Backlogs](%{base_url}/projects/your-scrum-project/backlogs) and open the sprint wiki from the right drop down menu in a sprint. You can edit the [wiki template](%{base_url}/projects/your-scrum-project/wiki/) based on your needs. + 7. *Activate further modules*: → Go to [Project settings → Modules](%{base_url}/projects/your-scrum-project/settings/modules). + + Here you will find our [User Guides](https://www.openproject.org/help/). + Please let us know if you have any questions or need support. Contact us: [support[at]openproject.com](mailto:support@openproject.com). + attachments: + - scrum_project_teaser.png + - block: project_description + - block: work_package_tracking + right: + - members + - news_latest diff --git a/modules/my_project_page/config/locales/en.seeders.yml b/modules/my_project_page/config/locales/en.seeders.yml deleted file mode 100644 index c80f9bcae2..0000000000 --- a/modules/my_project_page/config/locales/en.seeders.yml +++ /dev/null @@ -1,98 +0,0 @@ -#-- copyright -# OpenProject is a project management system. -# Copyright (C) 2012-2018 the OpenProject Foundation (OPF) -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License version 3. -# -# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: -# Copyright (C) 2006-2017 Jean-Philippe Lang -# Copyright (C) 2010-2013 the ChiliProject Team -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# See docs/COPYRIGHT.rdoc for more details. -#++ -en: - seeders: - demo_data: - projects: - demo-project: - project-overview: - top: - - id: b - title: '' - content: | - ![Teaser](##attachment:"demo_project_teaser.png") - left: - - id: a - title: Getting started - content: | - We are glad you joined! We suggest to try a few things to get started in OpenProject. - - Discover the most important features with our [Guided Tour](%{base_url}/projects/demo-project/work_packages/?start_onboarding_tour=true). - - _Try the following steps:_ - - 1. *Invite new members to your project*: → Go to [Members](%{base_url}/projects/demo-project/members) in the project navigation. - 2. *View the work in your project*: → Go to [Work packages](%{base_url}/projects/demo-project/work_packages) in the project navigation. - 3. *Create a new work package*: → Go to [Work packages → Create](%{base_url}/projects/demo-project/work_packages/new). - 4. *Create and update a project plan*: → Go to [Project plan](%{base_url}/projects/demo-project/work_packages?query_id=##query.id:"Project plan") in the project navigation. - 5. *Activate further modules*: → Go to [Project settings → Modules](%{base_url}/projects/demo-project/settings/modules). - 6. *Complete your tasks in the project*: → Go to [Work packages → Tasks](%{base_url}/projects/demo-project/work_packages/details/##wp.id:"Edit a work package"/overview?query_id=##query.id:"Tasks"). - - Here you will find our [User Guides](https://www.openproject.org/help/). - Please let us know if you have any questions or need support. Contact us: [support[at]openproject.com](mailto:support@openproject.com). - attachments: - - demo_project_teaser.png - - block: project_description - - block: work_package_tracking - right: - - members - - news_latest - scrum-project: - project-overview: - top: - - id: b - title: '' - content: | - ![Teaser](##attachment:"scrum_project_teaser.png") - left: - - id: a - title: Getting started - content: | - We are glad you joined! We suggest to try a few things to get started in OpenProject. - - Discover the most important features with our [Guided Tour](%{base_url}/projects/your-scrum-project/backlogs?start_scrum_onboarding_tour=true). - - _Try the following steps:_ - - 1. *Invite new members to your project*: → Go to [Members](%{base_url}/projects/your-scrum-project/members) in the project navigation. - 2. *View your Product backlog and Sprint backlogs*: → Go to [Backlogs](%{base_url}/projects/your-scrum-project/backlogs) in the project navigation. - 3. *View your Task board*: → Go to [Backlogs](%{base_url}/projects/your-scrum-project/backlogs) → Click on right arrow on Sprint → Select [Task Board](##sprint:"Sprint 1"). - 4. *Create a new work package*: → Go to [Work packages → Create](%{base_url}/projects/your-scrum-project/work_packages/new). - 5. *Create and update a project plan*: → Go to [Project plan](##query:"Project plan") in the project navigation. - 6. *Create a Sprint wiki*: → Go to [Backlogs](%{base_url}/projects/your-scrum-project/backlogs) and open the sprint wiki from the right drop down menu in a sprint. You can edit the [wiki template](%{base_url}/projects/your-scrum-project/wiki/) based on your needs. - 7. *Activate further modules*: → Go to [Project settings → Modules](%{base_url}/projects/your-scrum-project/settings/modules). - - Here you will find our [User Guides](https://www.openproject.org/help/). - Please let us know if you have any questions or need support. Contact us: [support[at]openproject.com](mailto:support@openproject.com). - attachments: - - scrum_project_teaser.png - - block: project_description - - block: work_package_tracking - right: - - members - - news_latest diff --git a/modules/reporting/app/models/cost_query/filter/user_id.rb b/modules/reporting/app/models/cost_query/filter/user_id.rb index 906554a290..2fce4967de 100644 --- a/modules/reporting/app/models/cost_query/filter/user_id.rb +++ b/modules/reporting/app/models/cost_query/filter/user_id.rb @@ -49,7 +49,6 @@ class CostQuery::Filter::UserId < Report::Filter::Base users = User.joins(members: :project) .merge(Project.visible) .not_builtin - .limit(100) .select(User::USER_FORMATS_STRUCTURE[Setting.user_format].map(&:to_s) << :id) .distinct diff --git a/script/ci/setup.sh b/script/ci/setup.sh index 178a8f7922..f8a445850e 100644 --- a/script/ci/setup.sh +++ b/script/ci/setup.sh @@ -34,6 +34,7 @@ set -e # $1 = TEST_SUITE # $2 = DB +# $3 = OPENPROJECT_EDITION run() { echo $1; @@ -52,6 +53,12 @@ elif [ $2 = "postgres" ]; then run "cp script/templates/database.travis.postgres.yml config/database.yml" fi +if [ "$3" = "bim" ]; then + export OPENPROJECT_EDITION="$3"; +else + unset OPENPROJECT_EDITION +fi + # run migrations for mysql or postgres if [ $1 != 'npm' ]; then run "bundle exec rake db:migrate" diff --git a/spec/seeders/demo_data_seeder_spec.rb b/spec/seeders/demo_data_seeder_spec.rb index de841312b1..d7fe278af9 100644 --- a/spec/seeders/demo_data_seeder_spec.rb +++ b/spec/seeders/demo_data_seeder_spec.rb @@ -1,5 +1,7 @@ #-- encoding: UTF-8 + #-- copyright + # OpenProject is a project management system. # Copyright (C) 2012-2018 the OpenProject Foundation (OPF) # @@ -29,27 +31,40 @@ require 'spec_helper' +def translate_with_base_url(string) + I18n.t(string, deep_interpolation: true, base_url: OpenProject::Configuration.rails_relative_url_root) +end + describe 'seeds' do - it 'create the demo data' do - perform_deliveries = ActionMailer::Base.perform_deliveries - ActionMailer::Base.perform_deliveries = false - - begin - # Avoid asynchronous DeliverWorkPackageCreatedJob - Delayed::Worker.delay_jobs = false - - expect { BasicDataSeeder.new.seed! }.not_to raise_error - expect { AdminUserSeeder.new.seed! }.not_to raise_error - expect { DemoDataSeeder.new.seed! }.not_to raise_error - - expect(User.where(admin: true).count).to eq 1 - expect(Project.count).to eq 2 - 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 12 - ensure - ActionMailer::Base.perform_deliveries = perform_deliveries + before do + allow(OpenProject::Configuration).to receive(:[]).and_call_original + allow(OpenProject::Configuration).to receive(:[]).with('edition').and_return(edition) + end + + context 'standard edition' do + let(:edition) { 'standard' } + + it 'create the demo data' do + perform_deliveries = ActionMailer::Base.perform_deliveries + ActionMailer::Base.perform_deliveries = false + + begin + # Avoid asynchronous DeliverWorkPackageCreatedJob + Delayed::Worker.delay_jobs = false + + expect { StandardSeeder::BasicDataSeeder.new.seed! }.not_to raise_error + expect { AdminUserSeeder.new.seed! }.not_to raise_error + expect { DemoDataSeeder.new.seed! }.not_to raise_error + + expect(User.where(admin: true).count).to eq 1 + expect(Project.count).to eq 2 + 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 12 + ensure + ActionMailer::Base.perform_deliveries = perform_deliveries + end end end end diff --git a/spec/seeders/setting_seeder_spec.rb b/spec/seeders/setting_seeder_spec.rb index c48c231e12..3291f433c7 100644 --- a/spec/seeders/setting_seeder_spec.rb +++ b/spec/seeders/setting_seeder_spec.rb @@ -49,22 +49,24 @@ describe 'SettingSeeder' do expect { subject.seed! }.not_to raise_error end - it 'applies initial settings' do - Setting.where(name: %w(commit_fix_status_id new_project_user_role_id)).delete_all + shared_examples 'settings' do + it 'applies initial settings' do + Setting.where(name: %w(commit_fix_status_id new_project_user_role_id)).delete_all - reseed! + reseed! - expect(Setting.commit_fix_status_id).to eq closed_status.id - expect(Setting.new_project_user_role_id).to eq new_project_role.id - end + expect(Setting.commit_fix_status_id).to eq closed_status.id + expect(Setting.new_project_user_role_id).to eq new_project_role.id + end - it 'does not override settings' do - Setting.commit_fix_status_id = 1337 - Setting.where(name: 'new_project_user_role_id').delete_all + it 'does not override settings' do + Setting.commit_fix_status_id = 1337 + Setting.where(name: 'new_project_user_role_id').delete_all - reseed! + reseed! - expect(Setting.commit_fix_status_id).to eq 1337 - expect(Setting.new_project_user_role_id).to eq new_project_role.id + expect(Setting.commit_fix_status_id).to eq 1337 + expect(Setting.new_project_user_role_id).to eq new_project_role.id + end end end