Commit e53dd752 authored by Robert Speicher's avatar Robert Speicher

Allow mass-unassigning of issues

Fixes #867

[ci skip]
parent 8490a8ab
......@@ -11,6 +11,7 @@ v 7.9.0 (unreleased)
- Fix ordering of imported but unchanged projects (Marco Wessel)
- Mobile UI improvements: make aside content expandable
- Generalize image upload in drag and drop in markdown to all files (Hannes Rosenögger)
- Fix mass-unassignment of issues (Robert Speicher)
v 7.8.1
- Fix run of custom post receive hooks
......
......@@ -15,7 +15,7 @@ class @ProjectUsersSelect
name: 'Unassigned',
avatar: null,
username: 'none',
id: ''
id: -1
}
data.results.unshift(nullUser)
......
......@@ -84,6 +84,25 @@ describe Issues::BulkUpdateService do
expect(@project.issues.first.assignee).to eq(@new_assignee)
}
it 'allows mass-unassigning' do
@project.issues.first.update_attribute(:assignee, @new_assignee)
expect(@project.issues.first.assignee).not_to be_nil
@params[:update][:assignee_id] = -1
Issues::BulkUpdateService.new(@project, @user, @params).execute
expect(@project.issues.first.assignee).to be_nil
end
it 'does not unassign when assignee_id is not present' do
@project.issues.first.update_attribute(:assignee, @new_assignee)
expect(@project.issues.first.assignee).not_to be_nil
@params[:update][:assignee_id] = ''
Issues::BulkUpdateService.new(@project, @user, @params).execute
expect(@project.issues.first.assignee).not_to be_nil
end
end
describe :update_milestone 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