Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/issuable/clone')
-rw-r--r--app/services/issuable/clone/attributes_rewriter.rb9
-rw-r--r--app/services/issuable/clone/base_service.rb4
2 files changed, 9 insertions, 4 deletions
diff --git a/app/services/issuable/clone/attributes_rewriter.rb b/app/services/issuable/clone/attributes_rewriter.rb
index 3861d88bce9..e1b4613726d 100644
--- a/app/services/issuable/clone/attributes_rewriter.rb
+++ b/app/services/issuable/clone/attributes_rewriter.rb
@@ -73,12 +73,17 @@ module Issuable
copy_events(ResourceStateEvent.table_name, original_entity.resource_state_events) do |event|
event.attributes
- .except('id')
+ .except(*blocked_state_event_attributes)
.merge(entity_key => new_entity.id,
'state' => ResourceStateEvent.states[event.state])
end
end
+ # Overriden on EE::Issuable::Clone::AttributesRewriter
+ def blocked_state_event_attributes
+ ['id']
+ end
+
def event_attributes_with_milestone(event, milestone)
event.attributes
.except('id')
@@ -118,4 +123,4 @@ module Issuable
end
end
-Issuable::Clone::AttributesRewriter.prepend_if_ee('EE::Issuable::Clone::AttributesRewriter')
+Issuable::Clone::AttributesRewriter.prepend_mod_with('Issuable::Clone::AttributesRewriter')
diff --git a/app/services/issuable/clone/base_service.rb b/app/services/issuable/clone/base_service.rb
index 3c2bc527b12..f8a9eb3ece5 100644
--- a/app/services/issuable/clone/base_service.rb
+++ b/app/services/issuable/clone/base_service.rb
@@ -65,7 +65,7 @@ module Issuable
end
def close_issue
- close_service = Issues::CloseService.new(old_project, current_user)
+ close_service = Issues::CloseService.new(project: old_project, current_user: current_user)
close_service.execute(original_entity, notifications: false, system_note: false)
end
@@ -88,4 +88,4 @@ module Issuable
end
end
-Issuable::Clone::BaseService.prepend_if_ee('EE::Issuable::Clone::BaseService')
+Issuable::Clone::BaseService.prepend_mod_with('Issuable::Clone::BaseService')