Added note when issue status changed (closed / reopened)

Implementation is correctly done through observer.
This commit is contained in:
Cedric Gatay 2011-12-29 21:50:26 +01:00
parent 78d882623e
commit e562129490

View file

@ -71,5 +71,11 @@ class MailerObserver < ActiveRecord::Observer
end
end
end
if issue.closed_changed?
note = Note.new(:noteable => issue, :project => issue.project)
note.author = current_user
note.note = "_Status changed to #{issue.closed ? 'closed' : 'reopened'}_"
note.save()
end
end
end