20170130000001_follow_up_possible_check_643.rb 1.4 KB

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