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

Fixed seeding issue with FactoryBot

Frank Bergmann0425c553dc7b
diff --git a/app/seeders/development_data/custom_fields_seeder.rb b/app/seeders/development_data/custom_fields_seeder.rb
index 2ea8986d713..2e36a1f4d62 100644
--- a/app/seeders/development_data/custom_fields_seeder.rb
+++ b/app/seeders/development_data/custom_fields_seeder.rb
@@ -47,14 +47,14 @@ module DevelopmentData
def create_types!(cfs)
# Create ALL CFs types
non_req_cfs = cfs.reject(&:is_required).map { |cf| "custom_field_#{cf.id}" }
- type = build :type, name: 'All CFS'
+ type = FactoryBot.build :type, name: 'All CFS'
extend_group(type, ['Custom fields', non_req_cfs])
type.save!
print_status '.'
# Create type
req_cfs = cfs.select(&:is_required).map { |cf| "custom_field_#{cf.id}" }
- type_req = build :type, name: 'Required CF'
+ type_req = FactoryBot.build :type, name: 'Required CF'
extend_group(type_req, ['Custom fields', req_cfs])
type_req.save!
print_status '.'