summaryrefslogtreecommitdiffstats
path: root/app/models/issue_status.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/issue_status.rb')
-rw-r--r--app/models/issue_status.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/issue_status.rb b/app/models/issue_status.rb
index a9c1db584..fdda12a8c 100644
--- a/app/models/issue_status.rb
+++ b/app/models/issue_status.rb
@@ -24,6 +24,7 @@ class IssueStatus < ActiveRecord::Base
validates_uniqueness_of :name
validates_length_of :name, :maximum => 30
validates_format_of :name, :with => /^[\w\s\'\-]*$/i
+ validates_inclusion_of :default_done_ratio, :in => 0..100, :allow_nil => true
def after_save
IssueStatus.update_all("is_default=#{connection.quoted_false}", ['id <> ?', id]) if self.is_default?