diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /app/services/issuable/clone/attributes_rewriter.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'app/services/issuable/clone/attributes_rewriter.rb')
-rw-r--r-- | app/services/issuable/clone/attributes_rewriter.rb | 9 |
1 files changed, 7 insertions, 2 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') |