Commit c4cac6b5 authored by jbbarth's avatar jbbarth
Browse files

Fixed "Create and continue" redirection broken by recent changes. #6333

IssuesController#create is no more scoped under project, but
IssuesController#new is, so we need to precise project_id
when redirecting to "New issue" form.

git-svn-id: https://svn.redmine.org/redmine/trunk@4083 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 1d5b7e95
......@@ -134,7 +134,7 @@ class IssuesController < ApplicationController
call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue})
respond_to do |format|
format.html {
redirect_to(params[:continue] ? { :action => 'new', :issue => {:tracker_id => @issue.tracker, :parent_issue_id => @issue.parent_issue_id}.reject {|k,v| v.nil?} } :
redirect_to(params[:continue] ? { :action => 'new', :project_id => @project, :issue => {:tracker_id => @issue.tracker, :parent_issue_id => @issue.parent_issue_id}.reject {|k,v| v.nil?} } :
{ :action => 'show', :id => @issue })
}
format.xml { render :action => 'show', :status => :created, :location => url_for(:controller => 'issues', :action => 'show', :id => @issue) }
......
......@@ -405,7 +405,8 @@ class IssuesControllerTest < ActionController::TestCase
:subject => 'This is first issue',
:priority_id => 5},
:continue => ''
assert_redirected_to :controller => 'issues', :action => 'new', :issue => {:tracker_id => 3}
assert_redirected_to :controller => 'issues', :action => 'new', :project_id => 'ecookbook',
:issue => {:tracker_id => 3}
end
def test_post_create_without_custom_fields_param
......
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