We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ffc403 commit cdae622Copy full SHA for cdae622
app/services/projects/copy_service.rb
@@ -59,6 +59,10 @@ def self.copyable_dependencies
59
count_source: ->(source, _) { source.work_packages.joins(:file_links).count("file_links.id") } }]
60
end
61
62
+ def initialize(contract_options: {}, **)
63
+ super(contract_options: contract_options.reverse_merge(validate_model: true), **)
64
+ end
65
+
66
protected
67
68
##
@@ -102,10 +106,6 @@ def copy_activated_custom_fields(call)
102
106
call.result.project_custom_field_ids = source.project_custom_field_ids
103
107
104
108
105
- def contract_options
- { copy_source: source, validate_model: true }
- end
-
109
def retain_attributes(source, target)
110
# Ensure we keep the public value of the source project
111
# which might get overridden by the SetAttributesService
0 commit comments