Merge branch 'master' into 286-add-sorting-by-status-inside-groups-at-monitoring-page
This commit is contained in:
commit
0b1f8ab54f
|
@ -448,17 +448,13 @@ class BuildList < ActiveRecord::Base
|
||||||
|
|
||||||
def notify_users
|
def notify_users
|
||||||
unless mass_build_id
|
unless mass_build_id
|
||||||
users = []
|
users = [user, publisher].compact.uniq.select{ |u| u.notifier.can_notify? && u.notifier.new_build? }
|
||||||
if project # find associated users
|
|
||||||
users = project.all_members.
|
# find associated users
|
||||||
select{ |user| user.notifier.can_notify? && user.notifier.new_associated_build? }
|
users |= project.all_members.select do |u|
|
||||||
end
|
u.notifier.can_notify? && u.notifier.new_associated_build?
|
||||||
if user.notifier.can_notify? && user.notifier.new_build?
|
end if project
|
||||||
users = users | [user]
|
users.each{ |u| UserMailer.build_list_notification(self, u).deliver }
|
||||||
end
|
|
||||||
users.each do |user|
|
|
||||||
UserMailer.build_list_notification(self, user).deliver
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end # notify_users
|
end # notify_users
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ module Modules::Observers::ActivityFeed::BuildList
|
||||||
)
|
)
|
||||||
|
|
||||||
updater = publisher || user
|
updater = publisher || user
|
||||||
project.admins.each do |recipient|
|
(project.admins | [publisher].compact).each do |recipient|
|
||||||
ActivityFeed.create(
|
ActivityFeed.create(
|
||||||
:user => recipient,
|
:user => recipient,
|
||||||
:kind => 'build_list_notification',
|
:kind => 'build_list_notification',
|
||||||
|
|
Loading…
Reference in New Issue