summaryrefslogtreecommitdiffstats
path: root/app/controllers/issues_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-08-20 12:41:24 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-08-20 12:41:24 +0000
commit0925ce756c30883692d4ba76dff69507f21525e6 (patch)
treed607c2a218a9eb94575fa407918dccec4f7383a3 /app/controllers/issues_controller.rb
parent9ef42ce3d5f9b224a304c5e46a82ec2ede19aee3 (diff)
downloadredmine-0925ce756c30883692d4ba76dff69507f21525e6.tar.gz
redmine-0925ce756c30883692d4ba76dff69507f21525e6.zip
Test failure (#23410).
git-svn-id: http://svn.redmine.org/redmine/trunk@15748 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/issues_controller.rb')
-rw-r--r--app/controllers/issues_controller.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 686a6b47f..d3dd2d504 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -151,7 +151,13 @@ class IssuesController < ApplicationController
return
else
respond_to do |format|
- format.html { render :action => 'new' }
+ format.html {
+ if @issue.project.nil?
+ render_error :status => 422
+ else
+ render :action => 'new'
+ end
+ }
format.api { render_validation_errors(@issue) }
end
end
@@ -484,7 +490,7 @@ class IssuesController < ApplicationController
render_error l(:error_no_default_issue_status)
return false
end
- else
+ elsif request.get?
render_error :message => l(:error_no_projects_with_tracker_allowed_for_new_issue), :status => 403
return false
end