core_workflow.rb 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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 - show secondary organization based on user',
  24. object: 'Ticket',
  25. condition_saved: {
  26. 'custom.module': {
  27. operator: 'match all modules',
  28. value: [
  29. 'CoreWorkflow::Custom::SecondaryOrganization',
  30. ],
  31. },
  32. },
  33. perform: {
  34. 'custom.module': {
  35. execute: ['CoreWorkflow::Custom::SecondaryOrganization']
  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 - admin sla options',
  44. object: 'Sla',
  45. condition_saved: {
  46. 'custom.module': {
  47. operator: 'match all modules',
  48. value: [
  49. 'CoreWorkflow::Custom::AdminSla',
  50. ],
  51. },
  52. },
  53. perform: {
  54. 'custom.module': {
  55. execute: ['CoreWorkflow::Custom::AdminSla']
  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 - core workflow',
  64. object: 'CoreWorkflow',
  65. condition_saved: {
  66. 'custom.module': {
  67. operator: 'match all modules',
  68. value: [
  69. 'CoreWorkflow::Custom::AdminCoreWorkflow',
  70. ],
  71. },
  72. },
  73. perform: {
  74. 'custom.module': {
  75. execute: ['CoreWorkflow::Custom::AdminCoreWorkflow']
  76. },
  77. },
  78. changeable: false,
  79. created_by_id: 1,
  80. updated_by_id: 1,
  81. )
  82. CoreWorkflow.create_if_not_exists(
  83. name: 'base - show reopen_time_in_days',
  84. object: 'Group',
  85. condition_saved: {},
  86. condition_selected: { 'group.follow_up_possible'=>{ 'operator' => 'is', 'value' => ['new_ticket_after_certain_time'] } },
  87. perform: { 'group.reopen_time_in_days'=>{ 'operator' => 'show', 'show' => 'true' } },
  88. preferences: { 'screen'=>%w[create edit] },
  89. changeable: false,
  90. active: true,
  91. created_by_id: 1,
  92. updated_by_id: 1,
  93. )
  94. CoreWorkflow.create_if_not_exists(
  95. name: 'base - ticket duplicate detection with same attributes',
  96. object: 'Ticket',
  97. condition_saved: {
  98. 'custom.module': {
  99. operator: 'match all modules',
  100. value: [
  101. 'CoreWorkflow::Custom::TicketDuplicateDetection',
  102. ],
  103. },
  104. },
  105. perform: {
  106. 'custom.module': {
  107. execute: ['CoreWorkflow::Custom::TicketDuplicateDetection']
  108. },
  109. },
  110. changeable: false,
  111. created_by_id: 1,
  112. updated_by_id: 1,
  113. )
  114. CoreWorkflow.create_if_not_exists(
  115. name: 'base - ticket time accouting check',
  116. object: 'Ticket',
  117. condition_saved: {
  118. 'custom.module': {
  119. operator: 'match all modules',
  120. value: [
  121. 'CoreWorkflow::Custom::TicketTimeAccountingCheck',
  122. ],
  123. },
  124. },
  125. perform: {
  126. 'custom.module': {
  127. execute: ['CoreWorkflow::Custom::TicketTimeAccountingCheck']
  128. },
  129. },
  130. changeable: false,
  131. priority: 99_999,
  132. created_by_id: 1,
  133. updated_by_id: 1,
  134. )