20170130000001_follow_up_possible_check_643.rb 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class FollowUpPossibleCheck643 < ActiveRecord::Migration[4.2]
  3. def up
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. Setting.create_if_not_exists(
  7. title: 'Define postmaster filter.',
  8. name: '0200_postmaster_filter_follow_up_possible_check',
  9. area: 'Postmaster::PreFilter',
  10. description: 'Define postmaster filter to check if follow-ups get created (based on admin settings).',
  11. options: {},
  12. state: 'Channel::Filter::FollowUpPossibleCheck',
  13. frontend: false
  14. )
  15. ObjectManager::Attribute.add(
  16. force: true,
  17. object: 'Group',
  18. name: 'follow_up_possible',
  19. display: 'Follow-up possible',
  20. data_type: 'select',
  21. data_option: {
  22. default: 'yes',
  23. options: {
  24. yes: 'yes',
  25. new_ticket: 'do not reopen Ticket but create new Ticket'
  26. },
  27. null: false,
  28. note: 'Follow-up for closed ticket possible or not.',
  29. translate: true
  30. },
  31. editable: false,
  32. active: true,
  33. screens: {
  34. create: {
  35. '-all-' => {
  36. null: true,
  37. },
  38. },
  39. edit: {
  40. '-all-' => {
  41. null: true,
  42. },
  43. },
  44. },
  45. to_create: false,
  46. to_migrate: false,
  47. to_delete: false,
  48. position: 400,
  49. )
  50. end
  51. end