##// END OF EJS Templates
added 999 as a maximum for time entry hours...
Jean-Philippe Lang -
r366:76d4ac17a2aa
parent child
Show More
@@ -17,7 +17,7 class TimeEntry < ActiveRecord::Base
17 17 end
18 18
19 19 def validate
20 errors.add :hours, :activerecord_error_invalid if hours && hours < 0
20 errors.add :hours, :activerecord_error_invalid if hours && (hours < 0 || hours >= 1000)
21 21 errors.add :project_id, :activerecord_error_invalid if project.nil?
22 22 errors.add :issue_id, :activerecord_error_invalid if (issue_id && !issue) || (issue && project!=issue.project)
23 23 end
General Comments 0
You need to be logged in to leave comments. Login now