Commit 82ec1220 authored by Mario de la Ossa's avatar Mario de la Ossa

Fix author on new issues by /clone quickcommand

When creating a new issue using the `/clone` quickcommand, we should be
using the current user as author, not the author of the original issue.
parent 348f46ec
...@@ -48,7 +48,7 @@ module Issues ...@@ -48,7 +48,7 @@ module Issues
id: nil, id: nil,
iid: nil, iid: nil,
project: target_project, project: target_project,
author: original_entity.author, author: current_user,
assignee_ids: original_entity.assignee_ids assignee_ids: original_entity.assignee_ids
} }
......
---
title: Fix author on /clone quickaction usage to be current user
merge_request: 49830
author:
type: fixed
...@@ -74,8 +74,8 @@ RSpec.describe Issues::CloneService do ...@@ -74,8 +74,8 @@ RSpec.describe Issues::CloneService do
expect(new_issue.changed?).to be false expect(new_issue.changed?).to be false
end end
it 'preserves author' do it 'sets the current user as author' do
expect(new_issue.author).to eq author expect(new_issue.author).to eq user
end end
it 'creates a new internal id for issue' do it 'creates a new internal id for issue' do
......
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