2022-01-21 15:00:17 +00:00
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
class SettingUpdates < ActiveRecord :: Migration [ 6 . 0 ]
2022-01-25 09:11:47 +00:00
def change
2022-01-21 15:00:17 +00:00
return if ! Setting . exists? ( name : 'system_init_done' )
settings_update = [
{
2022-01-25 09:11:47 +00:00
title : '2 lower case and 2 upper case characters' ,
2022-01-21 15:00:17 +00:00
name : 'password_min_2_lower_2_upper_characters' ,
2022-01-25 09:11:47 +00:00
description : 'Password needs to contain 2 lower case and 2 upper case characters.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'User email for multiple users' ,
2022-01-21 15:00:17 +00:00
name : 'user_email_multiple_use' ,
2022-01-25 09:11:47 +00:00
description : 'Allow using one email address for multiple users.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'sipgate.io alternative FQDN' ,
2022-01-21 15:00:17 +00:00
name : 'sipgate_alternative_fqdn' ,
2022-01-25 09:11:47 +00:00
description : 'Alternative FQDN for callbacks if you operate Zammad in an internal network.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Auto Assignment' ,
2022-01-21 15:00:17 +00:00
name : 'ticket_auto_assignment' ,
} ,
{
2022-01-25 09:11:47 +00:00
title : 'BCC address for all outgoing emails' ,
2022-01-21 15:00:17 +00:00
name : 'system_bcc' ,
2022-01-25 09:11:47 +00:00
description : 'To archive all outgoing emails from Zammad to external, you can store a BCC email address here.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Additional follow-up detection' ,
2022-01-21 15:00:17 +00:00
name : 'postmaster_follow_up_search_in' ,
2022-01-25 09:11:47 +00:00
description : 'By default, the follow-up check is done via the subject of an email. This setting lets you add more fields for which the follow-up check will be executed.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Note - default visibility' ,
2022-01-21 15:00:17 +00:00
name : 'ui_ticket_zoom_article_note_new_internal' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the default visibility for new notes.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Defines postmaster filter.' ,
2022-01-21 15:00:17 +00:00
name : '0014_postmaster_filter_own_notification_loop_detection' ,
2022-01-25 09:11:47 +00:00
description : 'Defines postmaster filter to check if the email is a self-created notification email, then ignore it to prevent email loops.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'HTTP type' ,
2022-01-21 15:00:17 +00:00
name : 'http_type' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the HTTP protocol of your instance.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Defines the timeframe during which a self-created note can be deleted.' ,
2022-01-21 15:00:17 +00:00
name : 'ui_ticket_zoom_article_delete_timeframe' ,
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Import Endpoint' ,
2022-01-21 15:00:17 +00:00
name : 'import_freshdesk_endpoint' ,
2022-01-25 09:11:47 +00:00
description : 'Defines a Freshdesk endpoint to import users, tickets, states, and articles.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Import Endpoint' ,
2022-01-21 15:00:17 +00:00
name : 'import_kayako_endpoint' ,
2022-01-25 09:11:47 +00:00
description : 'Defines a Kayako endpoint to import users, tickets, states, and articles.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Import Endpoint' ,
2022-01-21 15:00:17 +00:00
name : 'import_otrs_endpoint' ,
2022-01-25 09:11:47 +00:00
description : 'Defines an OTRS endpoint to import users, tickets, states, and articles.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Import Endpoint' ,
2022-01-21 15:00:17 +00:00
name : 'import_zendesk_endpoint' ,
2022-01-25 09:11:47 +00:00
description : 'Defines a Zendesk endpoint to import users, tickets, states, and articles.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Stats Backend' ,
2022-01-21 15:00:17 +00:00
name : 'Stats::TicketWaitingTime' ,
2022-01-25 09:11:47 +00:00
description : 'Defines a dashboard stats backend that gets scheduled automatically.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Stats Backend' ,
2022-01-21 15:00:17 +00:00
name : 'Stats::TicketEscalation' ,
2022-01-25 09:11:47 +00:00
description : 'Defines a dashboard stats backend that gets scheduled automatically.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Stats Backend' ,
2022-01-21 15:00:17 +00:00
name : 'Stats::TicketChannelDistribution' ,
2022-01-25 09:11:47 +00:00
description : 'Defines a dashboard stats backend that gets scheduled automatically.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Stats Backend' ,
2022-01-21 15:00:17 +00:00
name : 'Stats::TicketLoadMeasure' ,
2022-01-25 09:11:47 +00:00
description : 'Defines a dashboard stats backend that gets scheduled automatically.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Stats Backend' ,
2022-01-21 15:00:17 +00:00
name : 'Stats::TicketInProcess' ,
2022-01-25 09:11:47 +00:00
description : 'Defines a dashboard stats backend that gets scheduled automatically.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Stats Backend' ,
2022-01-21 15:00:17 +00:00
name : 'Stats::TicketReopen' ,
2022-01-25 09:11:47 +00:00
description : 'Defines a dashboard stats backend that gets scheduled automatically.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Import Password for HTTP basic authentication' ,
2022-01-21 15:00:17 +00:00
name : 'import_otrs_password' ,
2022-01-25 09:11:47 +00:00
description : 'Defines HTTP basic authentication password (only if OTRS is protected via HTTP basic auth).' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Developer System' ,
2022-01-21 15:00:17 +00:00
name : 'developer_mode' ,
2022-01-25 09:11:47 +00:00
description : 'Defines if the application is in developer mode (all users have the same password and password reset will work without email delivery).' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Group selection for ticket creation' ,
2022-01-21 15:00:17 +00:00
name : 'form_ticket_create_group_id' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the group of tickets created via web form.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Limit tickets by IP per day' ,
2022-01-21 15:00:17 +00:00
name : 'form_ticket_create_by_ip_per_day' ,
2022-01-25 09:11:47 +00:00
description : 'Defines a limit for how many tickets can be created via web form from one IP address per day.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Limit tickets by IP per hour' ,
2022-01-21 15:00:17 +00:00
name : 'form_ticket_create_by_ip_per_hour' ,
2022-01-25 09:11:47 +00:00
description : 'Defines a limit for how many tickets can be created via web form from one IP address per hour.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Limit tickets per day' ,
2022-01-21 15:00:17 +00:00
name : 'form_ticket_create_per_day' ,
2022-01-25 09:11:47 +00:00
description : 'Defines a limit for how many tickets can be created via web form per day.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Defines postmaster filter.' ,
2022-01-21 15:00:17 +00:00
name : '5400_postmaster_filter_jira_check' ,
2022-01-25 09:11:47 +00:00
description : 'Defines postmaster filter to identify Jira mails for correct follow-ups.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Defines postmaster filter.' ,
2022-01-21 15:00:17 +00:00
name : '5401_postmaster_filter_jira_check' ,
2022-01-25 09:11:47 +00:00
description : 'Defines postmaster filter to identify Jira mails for correct follow-ups.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Defines postmaster filter.' ,
2022-01-21 15:00:17 +00:00
name : '0950_postmaster_filter_bounce_delivery_permanent_failed' ,
2022-01-25 09:11:47 +00:00
description : 'Defines postmaster filter to identify postmaster bounces; and disables sending notification if delivery fails permanently.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Defines postmaster filter.' ,
2022-01-21 15:00:17 +00:00
name : '0955_postmaster_filter_bounce_delivery_temporary_failed' ,
2022-01-25 09:11:47 +00:00
description : 'Defines postmaster filter to identify postmaster bounces; and reopens tickets if delivery fails permanently.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Defines postmaster filter.' ,
2022-01-21 15:00:17 +00:00
name : '0900_postmaster_filter_bounce_follow_up_check' ,
2022-01-25 09:11:47 +00:00
description : 'Defines postmaster filter to identify postmaster bounces; and handles them as follow-up of the original tickets' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Defines postmaster filter.' ,
2022-01-21 15:00:17 +00:00
name : '5400_postmaster_filter_service_now_check' ,
2022-01-25 09:11:47 +00:00
description : 'Defines postmaster filter to identify ServiceNow mails for correct follow-ups.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Defines postmaster filter.' ,
2022-01-21 15:00:17 +00:00
name : '5401_postmaster_filter_service_now_check' ,
2022-01-25 09:11:47 +00:00
description : 'Defines postmaster filter to identify ServiceNow mails for correct follow-ups.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Defines postmaster filter.' ,
2022-01-21 15:00:17 +00:00
name : '0005_postmaster_filter_trusted' ,
2022-01-25 09:11:47 +00:00
description : 'Defines postmaster filter to remove X-Zammad headers from untrustworthy sources.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'HTML Email CSS Font' ,
2022-01-21 15:00:17 +00:00
name : 'html_email_css_font' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the CSS font information for HTML emails.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Geo IP Service' ,
2022-01-21 15:00:17 +00:00
name : 'geo_ip_backend' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the backend for geo IP lookups. Also shows location of an IP address if it is traceable.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'CTI config' ,
2022-01-21 15:00:17 +00:00
name : 'cti_config' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the CTI config.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Set agent limit' ,
2022-01-21 15:00:17 +00:00
name : 'system_agent_limit' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the agent limit.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Product Name' ,
2022-01-21 15:00:17 +00:00
name : 'product_name' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the name of the application, shown in the web interface, tabs, and title bar of the web browser.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Define postmaster filter.' ,
2022-01-21 15:00:17 +00:00
name : '5500_postmaster_internal_article_check' ,
2022-01-25 09:11:47 +00:00
description : 'Defines postmaster filter which sets the articles visibility to internal if it is a rely to an internal article or the last outgoing email is internal.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'CTI customer last activity' ,
2022-01-21 15:00:17 +00:00
name : 'cti_customer_last_activity' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the duration of customer activity (in seconds) on a call until the user profile dialog is shown.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Slack config' ,
2022-01-21 15:00:17 +00:00
name : 'slack_config' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the Slack config.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Auto-close state' ,
2022-01-21 15:00:17 +00:00
name : 'icinga_auto_close_state_id' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the state of auto-closed tickets.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Auto-close state' ,
2022-01-21 15:00:17 +00:00
name : 'nagios_auto_close_state_id' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the state of auto-closed tickets.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Auto-close state' ,
2022-01-21 15:00:17 +00:00
name : 'check_mk_auto_close_state_id' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the state of auto-closed tickets.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Auto-close state' ,
2022-01-21 15:00:17 +00:00
name : 'check_mk_auto_close_state_id' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the state of auto-closed tickets.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Locale' ,
2022-01-21 15:00:17 +00:00
name : 'locale_default' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the default system language.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Timezone' ,
2022-01-21 15:00:17 +00:00
name : 'timezone_default' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the default system timezone.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Defines transaction backend.' ,
2022-01-21 15:00:17 +00:00
name : '9100_cti_caller_id_detection' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the transaction backend which detects caller IDs in objects and stores them for CTI lookups.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'User Organization Selector - email' ,
2022-01-21 15:00:17 +00:00
name : 'ui_user_organization_selector_with_email' ,
2022-01-25 09:11:47 +00:00
description : 'Defines if the email should be displayed in the result of the user/organization widget.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'GitHub App Credentials' ,
2022-01-21 15:00:17 +00:00
name : 'auth_github_credentials' ,
2022-01-25 09:11:47 +00:00
description : 'Enables user authentication via GitHub.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Customer selection based on sender and receiver list' ,
2022-01-21 15:00:17 +00:00
name : 'postmaster_sender_is_agent_search_for_customer' ,
2022-01-25 09:11:47 +00:00
description : 'If the sender is an agent, set the first user in the recipient list as the customer.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Import API key for requesting the Freshdesk API' ,
2022-01-21 15:00:17 +00:00
name : 'import_freshdesk_endpoint_key' ,
2022-01-25 09:11:47 +00:00
description : 'Defines Freshdesk endpoint authentication API key.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Import API key for requesting the Zendesk API' ,
2022-01-21 15:00:17 +00:00
name : 'import_zendesk_endpoint_key' ,
2022-01-25 09:11:47 +00:00
description : 'Defines Zendesk endpoint authentication API key.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Knowledge Base active' ,
2022-01-21 15:00:17 +00:00
name : 'kb_active' ,
2022-01-25 09:11:47 +00:00
description : 'Defines if Knowledge Base navbar button is enabled.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Knowledge Base active publicly' ,
2022-01-21 15:00:17 +00:00
name : 'kb_active_publicly' ,
2022-01-25 09:11:47 +00:00
description : 'Defines if Knowledge Base navbar button is enabled for users without Knowledge Base permission.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Knowledge Base multilingual support' ,
2022-01-21 15:00:17 +00:00
name : 'kb_multi_lingual_support' ,
2022-01-25 09:11:47 +00:00
description : 'Support of multilingual Knowledge Base.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Maximum Email Size' ,
2022-01-21 15:00:17 +00:00
name : 'postmaster_max_size' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the maximum accepted email size in MB.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Maximum failed logins' ,
2022-01-21 15:00:17 +00:00
name : 'password_max_login_failed' ,
2022-01-25 09:11:47 +00:00
description : 'Defines after how many failed logins accounts will be deactivated.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Sender based on Reply-To header' ,
2022-01-21 15:00:17 +00:00
name : 'postmaster_sender_based_on_reply_to' ,
2022-01-25 09:11:47 +00:00
description : 'Set/overwrite sender/from of email based on "Reply-To" header. Useful to set correct customer if email is received from a third-party system on behalf of a customer.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Ticket Last Contact Behaviour' ,
2022-01-21 15:00:17 +00:00
name : 'ticket_last_contact_behaviour' ,
2022-01-25 09:11:47 +00:00
description : 'Sets the last customer contact based on either the last contact of the customer in general or on the last contact of the customer that has not received a response.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'CTI Token' ,
2022-01-21 15:00:17 +00:00
name : 'cti_token' ,
2022-01-25 09:11:47 +00:00
description : 'Token for CTI.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'CTI integration' ,
2022-01-21 15:00:17 +00:00
name : 'cti_integration' ,
2022-01-25 09:11:47 +00:00
description : 'Defines if generic CTI integration is enabled or not.' ,
2022-01-21 15:00:17 +00:00
} ,
{
2022-01-25 09:11:47 +00:00
title : 'Placetel Token' ,
2022-01-21 15:00:17 +00:00
name : 'placetel_token' ,
2022-01-25 09:11:47 +00:00
description : 'Defines the token for Placetel.' ,
2022-01-21 15:00:17 +00:00
} ,
]
settings_update . each do | setting |
fetched_setting = Setting . find_by ( name : setting [ :name ] )
next if ! fetched_setting
if setting [ :title ]
# "Updating title of #{setting[:name]} to #{setting[:title]}"
fetched_setting . title = setting [ :title ]
end
if setting [ :description ]
# "Updating description of #{setting[:name]} to #{setting[:description]}"
fetched_setting . description = setting [ :description ]
end
fetched_setting . save!
end
end
end