core_workflow.rb 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. CoreWorkflow.create_if_not_exists(
  3. name: 'base - hide pending time on non pending states',
  4. object: 'Ticket',
  5. condition_saved: {
  6. 'custom.module': {
  7. operator: 'match all modules',
  8. value: [
  9. 'CoreWorkflow::Custom::PendingTime',
  10. ],
  11. },
  12. },
  13. perform: {
  14. 'custom.module': {
  15. execute: ['CoreWorkflow::Custom::PendingTime']
  16. },
  17. },
  18. changeable: false,
  19. created_by_id: 1,
  20. updated_by_id: 1,
  21. )
  22. CoreWorkflow.create_if_not_exists(
  23. name: 'base - admin sla options',
  24. object: 'Sla',
  25. condition_saved: {
  26. 'custom.module': {
  27. operator: 'match all modules',
  28. value: [
  29. 'CoreWorkflow::Custom::AdminSla',
  30. ],
  31. },
  32. },
  33. perform: {
  34. 'custom.module': {
  35. execute: ['CoreWorkflow::Custom::AdminSla']
  36. },
  37. },
  38. changeable: false,
  39. created_by_id: 1,
  40. updated_by_id: 1,
  41. )
  42. CoreWorkflow.create_if_not_exists(
  43. name: 'base - core workflow',
  44. object: 'CoreWorkflow',
  45. condition_saved: {
  46. 'custom.module': {
  47. operator: 'match all modules',
  48. value: [
  49. 'CoreWorkflow::Custom::AdminCoreWorkflow',
  50. ],
  51. },
  52. },
  53. perform: {
  54. 'custom.module': {
  55. execute: ['CoreWorkflow::Custom::AdminCoreWorkflow']
  56. },
  57. },
  58. changeable: false,
  59. created_by_id: 1,
  60. updated_by_id: 1,
  61. )
  62. CoreWorkflow.create_if_not_exists(
  63. name: 'base - show reopen_time_in_days',
  64. object: 'Group',
  65. condition_saved: {},
  66. condition_selected: { 'group.follow_up_possible'=>{ 'operator' => 'is', 'value' => ['new_ticket_after_certain_time'] } },
  67. perform: { 'group.reopen_time_in_days'=>{ 'operator' => 'show', 'show' => 'true' } },
  68. preferences: { 'screen'=>%w[create edit] },
  69. changeable: false,
  70. active: true,
  71. created_by_id: 1,
  72. updated_by_id: 1,
  73. )