Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Seed project status and description

Henriette Dingera233b7904c37
diff --git a/app/seeders/demo_data/project_seeder.rb b/app/seeders/demo_data/project_seeder.rb
index cee28cb8d00..3a757b065bb 100644
--- a/app/seeders/demo_data/project_seeder.rb
+++ b/app/seeders/demo_data/project_seeder.rb
@@ -40,6 +40,9 @@ module DemoData
puts ' -Creating/Resetting project'
project = reset_project key
+ puts ' -Setting project status.'
+ set_project_status(project, key)
+
puts ' -Setting members.'
set_members(project)
@@ -116,6 +119,17 @@ module DemoData
end
end
+ def set_project_status(project, key)
+ status_code = project_data_for(key, 'status.code')
+ status_explanation = project_data_for(key, 'status.description')
+
+ Project::Status.create!(
+ project: project,
+ code: status_code,
+ explanation: status_explanation) if status_code || status_explanation
+
+ end
+
def set_members(project)
role = Role.find_by(name: translate_with_base_url(:default_role_project_admin))
user = User.admin.first
diff --git a/config/locales/en.seeders.standard.yml b/config/locales/en.seeders.standard.yml
index 5a9d2facb91..337a478ea26 100644
--- a/config/locales/en.seeders.standard.yml
+++ b/config/locales/en.seeders.standard.yml
@@ -46,6 +46,9 @@ en:
demo-project:
name: Demo project
identifier: demo-project
+ status:
+ code: on_track
+ description: All tasks are on schedule. The people involved know their tasks. The system is completely set up.
description: >
**This is a demo project**. You can edit the description in
the [Project settings -> Description](%{base_url}/projects/demo-project/settings).
@@ -389,6 +392,9 @@ en:
scrum-project:
name: Scrum project
identifier: your-scrum-project
+ status:
+ code: on_track
+ description: All tasks are on schedule. The people involved know their tasks. The system is completely set up.
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).
diff --git a/config/locales/en.seeders.standard.yml.example b/config/locales/en.seeders.standard.yml.example
index 5611b6c41d6..5f5a98f7318 100644
--- a/config/locales/en.seeders.standard.yml.example
+++ b/config/locales/en.seeders.standard.yml.example
@@ -70,6 +70,9 @@ en:
demo-project:
name: Demo project
identifier: demo-project
+ status:
+ code: off_track
+ description: Everything is behind the deadline. We will never make it.
description: >
**This is a demo project**. You can edit the description in
the [Project settings -> Description](%{base_url}/projects/demo-project/settings).
diff --git a/modules/bim_seeder/config/locales/en.seeders.bim.yml b/modules/bim_seeder/config/locales/en.seeders.bim.yml
index c4942200360..a2a109d73ef 100644
--- a/modules/bim_seeder/config/locales/en.seeders.bim.yml
+++ b/modules/bim_seeder/config/locales/en.seeders.bim.yml
@@ -83,6 +83,9 @@ en:
demo-construction-project:
name: (Demo) Construction project
identifier: demo-construction-project
+ status:
+ code: on_track
+ description: All tasks and the sub-projects are on schedule. The people involved know their tasks. The system is completely set up.
description: >
**This is a demo project**. You can edit the description in
the [Project settings -> Description](%{base_url}/projects/demo-construction-project/settings).
@@ -149,6 +152,9 @@ en:
demo-planning-constructing-project:
name: (Demo) Planning & constructing
identifier: demo-planning-constructing-project
+ status:
+ code: on_track
+ description: All tasks are on schedule. The people involved know their tasks. The system is completely set up.
parent: demo-construction-project
description: >
**This is a demo project**. You can edit the description in
@@ -530,6 +536,9 @@ en:
demo-bim-project:
name: (Demo) BIM project
identifier: demo-bim-project
+ status:
+ code: on_track
+ description: All tasks and sub-projects are on schedule. The people involved know their tasks. The system is completely set up.
parent: demo-construction-project
description: >
**This is a demo project**. You can edit the description in
@@ -1010,6 +1019,9 @@ en:
demo-bcf-management-project:
name: (Demo) BCF management
identifier: demo-bcf-management-project
+ status:
+ code: on_track
+ description: All tasks are on schedule. The people involved know their tasks. The system is completely set up.
parent: demo-bim-project
description: >
**This is a demo project for BCF**. You can edit the description in