Project

General

Profile

Patch #23328 » changeset_r619e156986dde1b674fa1e56bad4bc862c6e9df3.diff

Victor Campos, 2016-07-14 11:34

View differences:

app/models/project.rb
# Returns the users that should be notified on project events
def notified_users
# TODO: User part should be extracted to User#notify_about?
members.select {|m| m.principal.present? && (m.mail_notification? || m.principal.mail_notification == 'all')}.collect {|m| m.principal}
members.includes(:principal).select {|m| m.principal.present? && (m.mail_notification? || m.principal.mail_notification == 'all')}.collect {|m| m.principal}
end
# Returns a scope of all custom fields enabled for project issues
(1-1/7)