Fixed: error when changing tracker on the new issue form (#4345).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3125 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-12-06 10:37:08 +00:00
parent 719cd7cfce
commit 8f33c6589d
1 changed files with 3 additions and 3 deletions

View File

@ -436,11 +436,11 @@ class IssuesController < ApplicationController
end end
def update_form def update_form
if params[:id] if params[:id].blank?
@issue = @project.issues.visible.find(params[:id])
else
@issue = Issue.new @issue = Issue.new
@issue.project = @project @issue.project = @project
else
@issue = @project.issues.visible.find(params[:id])
end end
@issue.attributes = params[:issue] @issue.attributes = params[:issue]
@allowed_statuses = ([@issue.status] + @issue.status.find_new_statuses_allowed_to(User.current.roles_for_project(@project), @issue.tracker)).uniq @allowed_statuses = ([@issue.status] + @issue.status.find_new_statuses_allowed_to(User.current.roles_for_project(@project), @issue.tracker)).uniq