diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-09-28 08:05:55 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-09-28 08:05:55 +0000 |
commit | 925ef8f4f0387e955823dc9db849d0ba24b1291d (patch) | |
tree | 06bf2b8c59cd5b1ee708b0fdfd3cb1e056b79f42 /app/models/issue_status.rb | |
parent | ad06bec6b6b9900aceb101bafe8fd369096d19a1 (diff) | |
download | redmine-925ef8f4f0387e955823dc9db849d0ba24b1291d.tar.gz redmine-925ef8f4f0387e955823dc9db849d0ba24b1291d.zip |
Fixed: the default status is lost when reordering issue statuses (#1955).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1911 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_status.rb')
-rw-r--r-- | app/models/issue_status.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/issue_status.rb b/app/models/issue_status.rb index ddff9c005..16c7bce91 100644 --- a/app/models/issue_status.rb +++ b/app/models/issue_status.rb @@ -25,8 +25,8 @@ class IssueStatus < ActiveRecord::Base validates_length_of :name, :maximum => 30 validates_format_of :name, :with => /^[\w\s\'\-]*$/i - def before_save - IssueStatus.update_all "is_default=#{connection.quoted_false}" if self.is_default? + def after_save + IssueStatus.update_all("is_default=#{connection.quoted_false}", ['id <> ?', id]) if self.is_default? end # Returns the default status for new issues |