mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
Cleanup: Remove Issue#each_notification and Journal#each_notification (#26791).
Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@17584 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
015ca36634
commit
5416ed1022
@ -1047,21 +1047,6 @@ class Issue < ActiveRecord::Base
|
|||||||
notified_users.collect(&:mail)
|
notified_users.collect(&:mail)
|
||||||
end
|
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?
|
def notify?
|
||||||
@notify != false
|
@notify != false
|
||||||
end
|
end
|
||||||
|
|||||||
@ -94,19 +94,6 @@ class Journal < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
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
|
# Returns the JournalDetail for the given attribute, or nil if the attribute
|
||||||
# was not updated
|
# was not updated
|
||||||
def detail_for_attribute(attribute)
|
def detail_for_attribute(attribute)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user