提交 a42a839c 编写于 作者: D Dmitriy Zaporozhets

Merge pull request #252 from CedricGatay/feature/note_on_issue_status_changed

Added note when issue status changed (closed / reopened)
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册