Added bulk issue assignment by version. #1157

This commit is contained in:
Eric Davis
2008-06-03 15:17:11 -07:00
parent 322013f4a0
commit e1cea90cd0
5 changed files with 36 additions and 7 deletions
@@ -94,6 +94,18 @@ class DeliverablesController < ApplicationController
redirect_to :controller => 'issues', :action => 'index', :project_id => @project.id
end
def bulk_assign_issues
@deliverable = Deliverable.find_by_id_and_project_id(params[:deliverable_id], @project.id)
render_404 and return unless @deliverable
render_403 and return unless @deliverable.editable_by?(User.current)
number_updated = @deliverable.assign_issues_by_version(params[:version][:id])
flash[:notice] = l(:message_updated_issues, number_updated)
redirect_to :action => 'index', :id => @project.id
end
private
def find_project
@project = Project.find(params[:id])