20210823112140_issue_2455_follow_up_assignment.rb 787 B

12345678910111213141516171819202122
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Issue2455FollowUpAssignment < ActiveRecord::Migration[6.0]
  3. def change
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. Group.where(follow_up_assignment: false).find_each do |group|
  7. group.update(follow_up_assignment: true)
  8. end
  9. Setting.create_if_not_exists(
  10. title: 'Defines postmaster filter.',
  11. name: '0009_postmaster_filter_follow_up_assignment',
  12. area: 'Postmaster::PreFilter',
  13. description: 'Defines postmaster filter to set the owner (based on group follow up assignment).',
  14. options: {},
  15. state: 'Channel::Filter::FollowUpAssignment',
  16. frontend: false
  17. )
  18. end
  19. end