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

decrease overwriting of superclass method

ulfertsd6ca654903ab
diff --git a/app/services/base_services/copy.rb b/app/services/base_services/copy.rb
index a7bad660060..dd9b3907386 100644
--- a/app/services/base_services/copy.rb
+++ b/app/services/base_services/copy.rb
@@ -61,10 +61,9 @@ module BaseServices
end
def call(params)
- User.execute_as(user) do
- prepare(params)
- perform(params)
- end
+ prepare_state(params)
+
+ super
end
def after_validate(params, _call)
@@ -110,7 +109,7 @@ module BaseServices
#
# Note that for dependent copy services to be called
# this will already be present.
- def prepare(_params)
+ def prepare_state(_params)
# Retain the source project itself
state.source = source
end