summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-08-20 11:26:43 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-08-20 11:26:43 +0000
commit011606745fc7e2d06733d650be680c28c488974d (patch)
treed9988fbe5ef6b1816674951d1afbf40b6614c12d /app/controllers
parent1fad99ebe3880952c2fbade9b6ae44d57f8f4857 (diff)
downloadredmine-011606745fc7e2d06733d650be680c28c488974d.tar.gz
redmine-011606745fc7e2d06733d650be680c28c488974d.zip
New issue raises an error if no projects available (#23410).
git-svn-id: http://svn.redmine.org/redmine/trunk@15740 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/issues_controller.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 05fb064cd..686a6b47f 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -151,13 +151,7 @@ class IssuesController < ApplicationController
return
else
respond_to do |format|
- format.html {
- if @issue.project.nil?
- render_error :status => 422
- else
- render :action => 'new'
- end
- }
+ format.html { render :action => 'new' }
format.api { render_validation_errors(@issue) }
end
end
@@ -490,6 +484,9 @@ class IssuesController < ApplicationController
render_error l(:error_no_default_issue_status)
return false
end
+ else
+ render_error :message => l(:error_no_projects_with_tracker_allowed_for_new_issue), :status => 403
+ return false
end
@priorities = IssuePriority.active