Merge pull request #252 from CedricGatay/feature/note_on_issue_status_changed
Added note when issue status changed (closed / reopened)
This commit is contained in:
commit
a42a839ce5
|
@ -71,5 +71,11 @@ class MailerObserver < ActiveRecord::Observer
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue