macros.rb 463 B

12345678910111213141516171819
  1. Macro.create_if_not_exists(
  2. name: 'Close & Tag as Spam',
  3. perform: {
  4. 'ticket.state_id' => {
  5. value: Ticket::State.by_category(:closed).first.id,
  6. },
  7. 'ticket.tags' => {
  8. operator: 'add',
  9. value: 'spam',
  10. },
  11. 'ticket.owner_id' => {
  12. pre_condition: 'current_user.id',
  13. value: '',
  14. },
  15. },
  16. ux_flow_next_up: 'next_task',
  17. note: 'example macro',
  18. active: true,
  19. )