macros.rb 548 B

123456789101112131415161718192021
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. Macro.create_if_not_exists(
  3. name: __('Close & Tag as Spam'),
  4. perform: {
  5. 'ticket.state_id' => {
  6. value: Ticket::State.by_category(:closed).first.id,
  7. },
  8. 'ticket.tags' => {
  9. operator: 'add',
  10. value: 'spam',
  11. },
  12. 'ticket.owner_id' => {
  13. pre_condition: 'current_user.id',
  14. value: '',
  15. },
  16. },
  17. ux_flow_next_up: 'next_task',
  18. note: __('example macro'),
  19. active: true,
  20. )