Commit faae4544 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #8869 from tsigo/rs-issue-867

Allow mass-unassigning of issues
parents 7fef8456 e53dd752
...@@ -11,6 +11,7 @@ v 7.9.0 (unreleased) ...@@ -11,6 +11,7 @@ v 7.9.0 (unreleased)
- Fix ordering of imported but unchanged projects (Marco Wessel) - Fix ordering of imported but unchanged projects (Marco Wessel)
- Mobile UI improvements: make aside content expandable - Mobile UI improvements: make aside content expandable
- Generalize image upload in drag and drop in markdown to all files (Hannes Rosenögger) - 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 v 7.8.1
- Fix run of custom post receive hooks - Fix run of custom post receive hooks
......
...@@ -15,7 +15,7 @@ class @ProjectUsersSelect ...@@ -15,7 +15,7 @@ class @ProjectUsersSelect
name: 'Unassigned', name: 'Unassigned',
avatar: null, avatar: null,
username: 'none', username: 'none',
id: '' id: -1
} }
data.results.unshift(nullUser) data.results.unshift(nullUser)
......
...@@ -84,6 +84,25 @@ describe Issues::BulkUpdateService do ...@@ -84,6 +84,25 @@ describe Issues::BulkUpdateService do
expect(@project.issues.first.assignee).to eq(@new_assignee) 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 end
describe :update_milestone do 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