added 999 as a maximum for time entry hours
git-svn-id: http://redmine.rubyforge.org/svn/trunk@369 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
8d54d97007
commit
76d4ac17a2
|
@ -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…
Reference in New Issue