Project

General

Profile

Feature #1505 » default_due_date_model.diff

Functionality in model callback - Brian Terlson, 2008-06-19 21:52

View differences:

app/models/issue.rb
121 121
    if assigned_to.nil? && category && category.assigned_to
122 122
      self.assigned_to = category.assigned_to
123 123
    end
124
    
125
    # default due date based on version
126
    if fixed_version && fixed_version.effective_date && fixed_version.effective_date > Date.today then
127
      self.due_date = fixed_version.effective_date
128
    end
124 129
  end
125 130
  
126 131
  def before_save  
(2-2/2)