Commit af2d3189 authored by Jasper Maes's avatar Jasper Maes
Browse files

Rails 5: fix issue move service

In rails 5, the attributes method for an enum returns the name
instead of the database integer.
parent 8ac9bcd2c62a
......@@ -102,7 +102,7 @@ def copy_resource_label_events
events = batch.map do |event|
event.attributes
.except('id', 'reference', 'reference_html')
.merge('issue_id' => @new_issue.id, 'created_at' => event.created_at)
.merge('issue_id' => @new_issue.id, 'action' => ResourceLabelEvent.actions[event.action])
end
Gitlab::Database.bulk_insert(ResourceLabelEvent.table_name, events)
......
---
title: 'Rails 5: fix issue move service In rails 5, the attributes method for an enum
returns the name instead of the database integer.'
merge_request: 21616
author: Jasper Maes
type: other
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment