Commit bb0884b0 authored by Nick Thomas's avatar Nick Thomas

Resolve merge conflicts from EE master -> ce-to-ee

parent acce84d4
......@@ -30,11 +30,7 @@ module FormHelper
null_user: true,
current_user: true,
project_id: @project.id,
<<<<<<< HEAD
field_name: 'issue[assignee_ids][]',
=======
field_name: "issue[assignee_ids][]",
>>>>>>> upstream/master
default_label: 'Unassigned',
'max-select': 1,
'dropdown-header': 'Assignee',
......
......@@ -109,13 +109,6 @@ module Issuable
def allows_multiple_assignees?
false
end
<<<<<<< HEAD
def has_multiple_assignees?
assignees.count > 1
end
=======
>>>>>>> upstream/master
end
module ClassMethods
......
......@@ -137,43 +137,6 @@ module QuickActions
parse_params do |unassign_param|
# When multiple users are assigned, all will be unassigned if multiple assignees are no longer allowed
extract_users(unassign_param) if issuable.allows_multiple_assignees?
<<<<<<< HEAD
end
command :unassign do |users = nil|
@updates[:assignee_ids] =
if users&.any?
issuable.assignees.pluck(:id) - users.map(&:id)
else
[]
end
end
desc do
"Change assignee#{'(s)' if issuable.allows_multiple_assignees?}"
end
explanation do |users|
users = issuable.allows_multiple_assignees? ? users : users.take(1)
"Change #{'assignee'.pluralize(users.size)} to #{users.map(&:to_reference).to_sentence}."
end
params do
issuable.allows_multiple_assignees? ? '@user1 @user2' : '@user'
end
condition do
issuable.persisted? &&
current_user.can?(:"admin_#{issuable.to_ability_name}", project)
end
parse_params do |assignee_param|
extract_users(assignee_param)
end
command :reassign do |users|
@updates[:assignee_ids] =
if issuable.allows_multiple_assignees?
users.map(&:id)
else
[users.last.id]
end
=======
>>>>>>> upstream/master
end
command :unassign do |users = nil|
@updates[:assignee_ids] =
......
......@@ -50,11 +50,7 @@
- data[:multi_select] = true
- data['dropdown-title'] = title
- data['dropdown-header'] = dropdown_options[:data][:'dropdown-header']
<<<<<<< HEAD
- data['max-select'] = dropdown_options[:data][:'max-select']
=======
- data['max-select'] = dropdown_options[:data][:'max-select'] if dropdown_options[:data][:'max-select']
>>>>>>> upstream/master
- options[:data].merge!(data)
= dropdown_tag(title, options: options)
......@@ -32,13 +32,8 @@ describe 'New/edit issue', :feature, :js do
# the original method, resulting in infinite recurison when called.
# This is likely a bug with helper modules included into dynamically generated view classes.
# To work around this, we have to hold on to and call to the original implementation manually.
<<<<<<< HEAD
original_issue_dropdown_options = FormHelper.instance_method(:issue_assignees_dropdown_options)
allow_any_instance_of(FormHelper).to receive(:issue_assignees_dropdown_options).and_wrap_original do |original, *args|
=======
original_issue_dropdown_options = EE::FormHelper.instance_method(:issue_assignees_dropdown_options)
allow_any_instance_of(EE::FormHelper).to receive(:issue_assignees_dropdown_options).and_wrap_original do |original, *args|
>>>>>>> upstream/master
options = original_issue_dropdown_options.bind(original.receiver).call(*args)
options[:data][:per_page] = 2
......
......@@ -469,25 +469,6 @@ describe QuickActions::InterpretService, services: true do
_, updates = service.execute(content, merge_request)
expect(updates).to eq(assignee_ids: [])
<<<<<<< HEAD
end
end
end
context 'reassign command' do
let(:content) { '/reassign' }
context 'Issue' do
it 'reassigns user if content contains /reassign @user' do
user = create(:user)
issue.update(assignee_ids: [developer.id])
_, updates = service.execute("/reassign @#{user.username}", issue)
expect(updates).to eq(assignee_ids: [user.id])
=======
>>>>>>> upstream/master
end
end
end
......
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