Commit 11b70c97e3a49b6e6235f67452d56612fc141542
1 parent
43c10399
Exists in
master
and in
4 other branches
fix issue notification properly
Showing
1 changed file
with
2 additions
and
4 deletions
Show diff stats
app/controllers/issues_controller.rb
... | ... | @@ -41,10 +41,8 @@ class IssuesController < ApplicationController |
41 | 41 | def create |
42 | 42 | @issue = @project.issues.new(params[:issue]) |
43 | 43 | @issue.author = current_user |
44 | - if @issue.save | |
45 | - @project.users.reject { |u| u.id == current_user.id } .each do |u| | |
46 | - Notify.new_issue_email(@issue).deliver | |
47 | - end | |
44 | + if @issue.save && @issue.assignee != current_user | |
45 | + Notify.new_issue_email(@issue).deliver | |
48 | 46 | end |
49 | 47 | |
50 | 48 | respond_with(@issue) | ... | ... |