summaryrefslogtreecommitdiffstats
path: root/app/models/time_entry.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-03-23 13:11:47 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-03-23 13:11:47 +0000
commit76d4ac17a2aa449b59f0dbd38de7f94bafce8fde (patch)
tree697ca77b6bc95d605191414b49566a826dc4a88c /app/models/time_entry.rb
parent8d54d9700746636849bd104f4d18db479492505e (diff)
downloadredmine-76d4ac17a2aa449b59f0dbd38de7f94bafce8fde.tar.gz
redmine-76d4ac17a2aa449b59f0dbd38de7f94bafce8fde.zip
added 999 as a maximum for time entry hours
git-svn-id: http://redmine.rubyforge.org/svn/trunk@369 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/time_entry.rb')
-rw-r--r--app/models/time_entry.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/time_entry.rb b/app/models/time_entry.rb
index 4f2c561f5..984c2c3a0 100644
--- a/app/models/time_entry.rb
+++ b/app/models/time_entry.rb
@@ -17,7 +17,7 @@ class TimeEntry < ActiveRecord::Base
end
def validate
- errors.add :hours, :activerecord_error_invalid if hours && hours < 0
+ errors.add :hours, :activerecord_error_invalid if hours && (hours < 0 || hours >= 1000)
errors.add :project_id, :activerecord_error_invalid if project.nil?
errors.add :issue_id, :activerecord_error_invalid if (issue_id && !issue) || (issue && project!=issue.project)
end