summaryrefslogtreecommitdiffstats
path: root/app/models/issue.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index aef3ddb31..82e0e35ed 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -58,6 +58,7 @@ class Issue < ActiveRecord::Base
validates_length_of :subject, :maximum => 255
validates_inclusion_of :done_ratio, :in => 0..100
validates_numericality_of :estimated_hours, :allow_nil => true
+ validate :validate_issue
named_scope :visible, lambda {|*args| { :include => :project,
:conditions => Issue.visible_condition(args.shift || User.current, *args) } }
@@ -337,7 +338,7 @@ class Issue < ActiveRecord::Base
Setting.issue_done_ratio == 'issue_field'
end
- def validate
+ def validate_issue
if self.due_date.nil? && @attributes['due_date'] && !@attributes['due_date'].empty?
errors.add :due_date, :not_a_date
end