diff options
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') |