Added an error message when trying to create an issue with no default status defined.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@560 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
438161ad1f
commit
a681d8bf4d
|
@ -231,6 +231,11 @@ class ProjectsController < ApplicationController
|
|||
@priorities = Enumeration::get_values('IPRI')
|
||||
|
||||
default_status = IssueStatus.default
|
||||
unless default_status
|
||||
flash.now[:notice] = 'No default issue status defined. Please check your configuration.'
|
||||
render :nothing => true, :layout => true
|
||||
return
|
||||
end
|
||||
@issue = Issue.new(:project => @project, :tracker => @tracker)
|
||||
@issue.status = default_status
|
||||
@allowed_statuses = ([default_status] + default_status.find_new_statuses_allowed_to(logged_in_user.role_for_project(@project), @issue.tracker))if logged_in_user
|
||||
|
|
Loading…
Reference in New Issue