##// 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 end
17 end
18
18
19 def validate
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 errors.add :project_id, :activerecord_error_invalid if project.nil?
21 errors.add :project_id, :activerecord_error_invalid if project.nil?
22 errors.add :issue_id, :activerecord_error_invalid if (issue_id && !issue) || (issue && project!=issue.project)
22 errors.add :issue_id, :activerecord_error_invalid if (issue_id && !issue) || (issue && project!=issue.project)
23 end
23 end
General Comments 0
You need to be logged in to leave comments. Login now