Commit cb151388 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'rails5-fix-issue-move-service' into 'master'

Rails 5: fix issue move service

See merge request gitlab-org/gitlab-ce!21616
parents 282db545 459fdb1f
...@@ -102,7 +102,7 @@ module Issues ...@@ -102,7 +102,7 @@ module Issues
events = batch.map do |event| events = batch.map do |event|
event.attributes event.attributes
.except('id', 'reference', 'reference_html') .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 end
Gitlab::Database.bulk_insert(ResourceLabelEvent.table_name, events) 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