summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-12-06 10:37:08 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-12-06 10:37:08 +0000
commit8f33c6589d67493cad0c03aad7204a06420f8829 (patch)
tree9668c02a26ec958b78299a50cd1a4bd88e70da41
parent719cd7cfce31fc1f469928dfd1126d194c758f77 (diff)
downloadredmine-8f33c6589d67493cad0c03aad7204a06420f8829.tar.gz
redmine-8f33c6589d67493cad0c03aad7204a06420f8829.zip
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
-rw-r--r--app/controllers/issues_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 4ca7aa90f..c997da940 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -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