trabajo-afectivo/db/seeds/macros.rb

19 lines
377 B
Ruby
Raw Normal View History

Macro.create_if_not_exists(
name: 'Close & Tag as Spam',
perform: {
'ticket.state_id' => {
value: Ticket::State.by_category(:closed).first.id,
},
'ticket.tags' => {
operator: 'add',
value: 'spam',
},
'ticket.owner_id' => {
pre_condition: 'current_user.id',
value: '',
},
},
note: 'example macro',
active: true,
)