Update trigger recipient to use reply_to in default auto responders.
This commit is contained in:
parent
1b5dbdce6a
commit
79a4f2972a
2 changed files with 21 additions and 2 deletions
19
db/migrate/20170516000001_trigger_recipient_update.rb
Normal file
19
db/migrate/20170516000001_trigger_recipient_update.rb
Normal file
|
@ -0,0 +1,19 @@
|
|||
class TriggerRecipientUpdate < ActiveRecord::Migration
|
||||
def up
|
||||
|
||||
# return if it's a new setup
|
||||
return if !Setting.find_by(name: 'system_init_done')
|
||||
|
||||
['auto reply (on new tickets)', 'auto reply (on follow up of tickets)'].each { |name|
|
||||
trigger = Trigger.find_by(name: name)
|
||||
next if !trigger
|
||||
next if !trigger.perform
|
||||
next if !trigger.perform['notification.email']
|
||||
next if !trigger.perform['notification.email']['recipient']
|
||||
next if trigger.perform['notification.email']['recipient'] != 'ticket_customer'
|
||||
trigger.perform['notification.email']['recipient'] = 'article_last_sender'
|
||||
trigger.save
|
||||
}
|
||||
|
||||
end
|
||||
end
|
|
@ -33,7 +33,7 @@ Trigger.create_or_update(
|
|||
<div>Your #{config.product_name} Team</div>
|
||||
<br/>
|
||||
<div><i><a href="https://zammad.com">Zammad</a>, your customer support system</i></div>',
|
||||
'recipient' => 'ticket_customer',
|
||||
'recipient' => 'article_last_sender',
|
||||
'subject' => 'Thanks for your inquiry (#{ticket.title})',
|
||||
},
|
||||
},
|
||||
|
@ -72,7 +72,7 @@ Trigger.create_or_update(
|
|||
<div>Your #{config.product_name} Team</div>
|
||||
<br/>
|
||||
<div><i><a href="https://zammad.com">Zammad</a>, your customer support system</i></div>',
|
||||
'recipient' => 'ticket_customer',
|
||||
'recipient' => 'article_last_sender',
|
||||
'subject' => 'Thanks for your follow up (#{ticket.title})',
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue