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

Add conditional check before copying relations

Mir Bhatiad18641ab2467
diff --git a/app/services/work_packages/bulk/copy_service.rb b/app/services/work_packages/bulk/copy_service.rb
index c60c9c12ee7..0227f5c8050 100644
--- a/app/services/work_packages/bulk/copy_service.rb
+++ b/app/services/work_packages/bulk/copy_service.rb
@@ -56,10 +56,9 @@ module WorkPackages
@wp_map.store(work_package.id, wp_copy.result.id)
end
+ copy_relations unless result.failure?
result.result = false if result.failure?
- copy_relations
-
result
end