added 999 as a maximum for time entry hours

git-svn-id: http://redmine.rubyforge.org/svn/trunk@369 e93f8b46-1217-0410-a6f0-8f06a7374b81
pull/351/head
Jean-Philippe Lang 18 years ago
parent 8d54d97007
commit 76d4ac17a2
  1. 2
      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

Loading…
Cancel
Save