Merge branch 'develop' into private-issue887-online-notification
This commit is contained in:
commit
4d454289f9
3 changed files with 12 additions and 4 deletions
|
@ -715,8 +715,15 @@ perform changes on ticket
|
|||
group = self.group
|
||||
next if !group
|
||||
email_address = group.email_address
|
||||
next if !email_address
|
||||
next if !email_address.channel_id
|
||||
if !email_address
|
||||
logger.info "Unable to send trigger based notification to #{recipient_string} because no email address is set for group '#{group.name}'"
|
||||
next
|
||||
end
|
||||
|
||||
if !email_address.channel_id
|
||||
logger.info "Unable to send trigger based notification to #{recipient_string} because no channel is set for email address '#{email_address.email}' (id: #{email_address.id})"
|
||||
next
|
||||
end
|
||||
|
||||
objects = {
|
||||
ticket: self,
|
||||
|
|
|
@ -44,7 +44,7 @@ class Transaction::Trigger
|
|||
|
||||
original_user_id = UserInfo.current_user_id
|
||||
|
||||
Transaction.execute(reset_user_id: true, disable: ['Transaction::Trigger']) do
|
||||
Transaction.execute(reset_user_id: true, disable: ['Transaction::Trigger', 'Transaction::Notification']) do
|
||||
triggers.each { |trigger|
|
||||
condition = trigger.condition
|
||||
|
||||
|
|
|
@ -273,7 +273,8 @@ class ClearbitTest < ActiveSupport::TestCase
|
|||
assert_equal('', customer6_lookup.lastname)
|
||||
assert_equal('', customer6_lookup.note)
|
||||
assert_equal('http://clearbit.com', customer6_lookup.web)
|
||||
assert_equal('3030 16th St, San Francisco, CA 94103, USA', customer6_lookup.address)
|
||||
#assert_equal('3030 16th St, San Francisco, CA 94103, USA', customer6_lookup.address)
|
||||
assert_equal('San Francisco, CA, USA', customer6_lookup.address)
|
||||
|
||||
organization6_lookup = Organization.find_by(name: 'Clearbit')
|
||||
assert(ExternalSync.find_by(source: 'clearbit', object: 'Organization', o_id: organization6_lookup.id))
|
||||
|
|
Loading…
Reference in a new issue