]> source.dussan.org Git - redmine.git/commitdiff
Fixed: error when changing tracker on the new issue form (#4345).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 6 Dec 2009 10:37:08 +0000 (10:37 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 6 Dec 2009 10:37:08 +0000 (10:37 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3125 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/issues_controller.rb

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