Reject inversed dates

pull/6827/head
friflaj 14 years ago
parent 76c2ee5c69
commit 4f023af468
  1. 5
      app/models/sprint.rb

@ -170,6 +170,11 @@ end
class Sprint < Version
unloadable
validate :correctness
def correctness
errors.add_to_base("Sprint cannot end before it starts") if self.effective_date && self.sprint_start_date && self.sprint_start_date >= self.effective_date
end
named_scope :open_sprints, lambda { |project|
{
:order => 'sprint_start_date ASC, effective_date ASC',

Loading…
Cancel
Save