From a681d8bf4d20dd24a4e65835d34bd8d954fd54c8 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 12 Jun 2007 22:31:05 +0000 Subject: [PATCH] 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 --- app/controllers/projects_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index ead1a224a..233d012d2 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -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