Commit 5b4032d1 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #3118 from 2called-chaos/dont_send_mails_twice

Do not send issue status mail twice if author = assignee
parents 62562e4d c280c3ce
...@@ -27,7 +27,7 @@ class IssueObserver < ActiveRecord::Observer ...@@ -27,7 +27,7 @@ class IssueObserver < ActiveRecord::Observer
def create_note(issue) def create_note(issue)
Note.create_status_change_note(issue, current_user, issue.state) Note.create_status_change_note(issue, current_user, issue.state)
[issue.author, issue.assignee].compact.each do |recipient| [issue.author, issue.assignee].compact.uniq.each do |recipient|
Notify.delay.issue_status_changed_email(recipient.id, issue.id, issue.state, current_user.id) Notify.delay.issue_status_changed_email(recipient.id, issue.id, issue.state, current_user.id)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment