mirror of
https://github.com/redmine/redmine.git
synced 2026-03-04 03:21:24 +01:00
added issue validation on time_entry
git-svn-id: http://redmine.rubyforge.org/svn/branches/work@366 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -17,7 +17,7 @@ class TimeEntry < ActiveRecord::Base
|
||||
def validate
|
||||
errors.add :hours, :activerecord_error_invalid if hours && hours < 0
|
||||
errors.add :project_id, :activerecord_error_invalid if project.nil?
|
||||
errors.add :issue_id, :activerecord_error_invalid if issue && project!=issue.project
|
||||
errors.add :issue_id, :activerecord_error_invalid if (issue_id && !issue) || (issue && project!=issue.project)
|
||||
end
|
||||
|
||||
def spent_on=(date)
|
||||
|
||||
Reference in New Issue
Block a user