[#200] fix sending message to pull assignee
This commit is contained in:
parent
38ced2c998
commit
d692b6d450
|
@ -18,7 +18,7 @@ module Modules::Observers::ActivityFeed::Issue
|
||||||
collect_recipients.each do |recipient|
|
collect_recipients.each do |recipient|
|
||||||
next if user_id == recipient.id
|
next if user_id == recipient.id
|
||||||
if recipient.notifier.can_notify && recipient.notifier.new_issue && assignee_id != recipient.id
|
if recipient.notifier.can_notify && recipient.notifier.new_issue && assignee_id != recipient.id
|
||||||
UserMailer.new_issue_notification(self, recipient).deliver
|
UserMailer.new_issue_notification(self, recipient).deliver
|
||||||
end
|
end
|
||||||
ActivityFeed.create(
|
ActivityFeed.create(
|
||||||
:user => recipient,
|
:user => recipient,
|
||||||
|
@ -35,12 +35,11 @@ module Modules::Observers::ActivityFeed::Issue
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
# dont remove outdated issues link
|
|
||||||
Comment.create_link_on_issues_from_item(self)
|
Comment.create_link_on_issues_from_item(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
def send_assign_notifications(action = :create)
|
def send_assign_notifications(action = :create)
|
||||||
if assignee_id && assignee_id_changed?
|
if(action == :create && assignee_id) || assignee_id_changed?
|
||||||
if assignee.notifier.issue_assign && assignee.notifier.can_notify
|
if assignee.notifier.issue_assign && assignee.notifier.can_notify
|
||||||
UserMailer.issue_assign_notification(self, assignee).deliver
|
UserMailer.issue_assign_notification(self, assignee).deliver
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue