Commit 459fdb1f authored by Jasper Maes's avatar Jasper Maes

Rails 5: fix issue move service

In rails 5, the attributes method for an enum returns the name
instead of the database integer.
parent 282db545
......@@ -102,7 +102,7 @@ module Issues
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