Commit fa81241b authored by Jan Provaznik's avatar Jan Provaznik Committed by Thong Kuah

Enable custom_service_desk_address by default

Allows configuration of custom service desk address suffix by default.
parent d89f1742
...@@ -2495,7 +2495,7 @@ class Project < ApplicationRecord ...@@ -2495,7 +2495,7 @@ class Project < ApplicationRecord
end end
def service_desk_custom_address_enabled? def service_desk_custom_address_enabled?
::Gitlab::ServiceDeskEmail.enabled? && ::Feature.enabled?(:service_desk_custom_address, self) ::Gitlab::ServiceDeskEmail.enabled? && ::Feature.enabled?(:service_desk_custom_address, self, default_enabled: true)
end end
def root_namespace def root_namespace
......
...@@ -5,7 +5,7 @@ module ServiceDeskSettings ...@@ -5,7 +5,7 @@ module ServiceDeskSettings
def execute def execute
settings = ServiceDeskSetting.safe_find_or_create_by!(project_id: project.id) settings = ServiceDeskSetting.safe_find_or_create_by!(project_id: project.id)
unless ::Feature.enabled?(:service_desk_custom_address, project) unless ::Feature.enabled?(:service_desk_custom_address, project, default_enabled: true)
params.delete(:project_key) params.delete(:project_key)
end end
......
---
title: Allow to configure custom service desk email address suffix
merge_request: 49932
author:
type: added
...@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/284656 ...@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/284656
milestone: milestone:
type: development type: development
group: group::certify group: group::certify
default_enabled: false default_enabled: true
...@@ -4,7 +4,7 @@ group: Certify ...@@ -4,7 +4,7 @@ group: Certify
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
--- ---
# Service Desk # Service Desk **(CORE)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/149) in [GitLab Premium](https://about.gitlab.com/pricing/) 9.1. > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/149) in [GitLab Premium](https://about.gitlab.com/pricing/) 9.1.
> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/214839) to [GitLab Starter](https://about.gitlab.com/pricing/) in 13.0. > - [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/214839) to [GitLab Starter](https://about.gitlab.com/pricing/) in 13.0.
...@@ -129,10 +129,12 @@ this name in the `From` header. The default display name is `GitLab Support Bot` ...@@ -129,10 +129,12 @@ this name in the `From` header. The default display name is `GitLab Support Bot`
### Using custom email address **(CORE ONLY)** ### Using custom email address **(CORE ONLY)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/2201) in [GitLab Premium](https://about.gitlab.com/pricing/) 13.0. > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/2201) in [GitLab Premium](https://about.gitlab.com/pricing/) 13.0.
> - It was [deployed behind a feature flag](../feature_flags.md), disabled by default.
NOTE: > - [Became enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/284656) on GitLab 13.7.
This feature is disabled by default. For steps to enable it, see [Enable custom email address](#enable-custom-email-address). > - It's enabled on GitLab.com.
> - It's recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#disable-custom-email-address). **(CORE ONLY)**
If the `service_desk_email` feature flag is enabled in your configuration, If the `service_desk_email` feature flag is enabled in your configuration,
then it's possible to create Service Desk issues by sending emails to the then it's possible to create Service Desk issues by sending emails to the
...@@ -198,18 +200,27 @@ In this case, suppose the `mygroup/myproject` project Service Desk settings has ...@@ -198,18 +200,27 @@ In this case, suppose the `mygroup/myproject` project Service Desk settings has
suffix set to `support`, and a user sends an email to `project_contact+mygroup-myproject-support@example.com`. suffix set to `support`, and a user sends an email to `project_contact+mygroup-myproject-support@example.com`.
As a result, a new Service Desk issue is created from this email in the `mygroup/myproject` project. As a result, a new Service Desk issue is created from this email in the `mygroup/myproject` project.
#### Enable custom email address The configuration options are the same as for configuring
[incoming email](../../administration/incoming_email.md#set-it-up).
#### Disable custom email address **(CORE ONLY)**
Service Desk custom email is under development but ready for production use.
It is deployed behind a feature flag that is **enabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../administration/feature_flags.md)
can opt to disable it.
This feature comes with the `service_desk_custom_address` feature flag disabled by default. To enable it:
To turn on the feature, ask a GitLab administrator with Rails console access to run the following
command:
```ruby ```ruby
Feature.enable(:service_desk_custom_address) Feature.enable(:service_desk_custom_address)
``` ```
The configuration options are the same as for configuring To disable it:
[incoming email](../../administration/incoming_email.md#set-it-up).
```ruby
Feature.disable(:service_desk_custom_address)
```
## Using Service Desk ## Using Service Desk
......
...@@ -68,7 +68,7 @@ module Gitlab ...@@ -68,7 +68,7 @@ module Gitlab
end end
def valid_project_key?(project, slug) def valid_project_key?(project, slug)
project.present? && slug == project.full_path_slug && Feature.enabled?(:service_desk_custom_address, project) project.present? && slug == project.full_path_slug && Feature.enabled?(:service_desk_custom_address, project, default_enabled: true)
end end
def create_issue! def create_issue!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment