2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-08-24 13:57:50 +00:00
|
|
|
|
|
|
|
class Issue2455FollowUpAssignment < ActiveRecord::Migration[6.0]
|
|
|
|
def change
|
|
|
|
# return if it's a new setup
|
|
|
|
return if !Setting.exists?(name: 'system_init_done')
|
|
|
|
|
|
|
|
Group.where(follow_up_assignment: false).find_each do |group|
|
|
|
|
group.update(follow_up_assignment: true)
|
|
|
|
end
|
|
|
|
|
|
|
|
Setting.create_if_not_exists(
|
|
|
|
title: 'Defines postmaster filter.',
|
|
|
|
name: '0009_postmaster_filter_follow_up_assignment',
|
|
|
|
area: 'Postmaster::PreFilter',
|
|
|
|
description: 'Defines postmaster filter to set the owner (based on group follow up assignment).',
|
|
|
|
options: {},
|
|
|
|
state: 'Channel::Filter::FollowUpAssignment',
|
|
|
|
frontend: false
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|