summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/services/issues/move_service.rb2
-rw-r--r--changelogs/unreleased/rails5-fix-issue-move-service.yml6
2 files changed, 7 insertions, 1 deletions
diff --git a/app/services/issues/move_service.rb b/app/services/issues/move_service.rb
index c52aa577dd8..ec9d8944e4e 100644
--- a/app/services/issues/move_service.rb
+++ b/app/services/issues/move_service.rb
@@ -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)
diff --git a/changelogs/unreleased/rails5-fix-issue-move-service.yml b/changelogs/unreleased/rails5-fix-issue-move-service.yml
new file mode 100644
index 00000000000..1e71544e587
--- /dev/null
+++ b/changelogs/unreleased/rails5-fix-issue-move-service.yml
@@ -0,0 +1,6 @@
+---
+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