Feature #26791 » 0002-Cleanup-Remove-Issue-each_notification-and-Journal-e.patch
| app/models/issue.rb | ||
|---|---|---|
|
notified_users.collect(&:mail)
|
||
|
end
|
||
|
def each_notification(users, &block)
|
||
|
if users.any?
|
||
|
if custom_field_values.detect {|value| !value.custom_field.visible?}
|
||
|
users_by_custom_field_visibility = users.group_by do |user|
|
||
|
visible_custom_field_values(user).map(&:custom_field_id).sort
|
||
|
end
|
||
|
users_by_custom_field_visibility.values.each do |users|
|
||
|
yield(users)
|
||
|
end
|
||
|
else
|
||
|
yield(users)
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
def notify?
|
||
|
@notify != false
|
||
|
end
|
||
| app/models/journal.rb | ||
|---|---|---|
|
end
|
||
|
end
|
||
|
def each_notification(users, &block)
|
||
|
if users.any?
|
||
|
users_by_details_visibility = users.group_by do |user|
|
||
|
visible_details(user)
|
||
|
end
|
||
|
users_by_details_visibility.each do |visible_details, users|
|
||
|
if notes? || visible_details.any?
|
||
|
yield(users)
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
# Returns the JournalDetail for the given attribute, or nil if the attribute
|
||
|
# was not updated
|
||
|
def detail_for_attribute(attribute)
|
||