Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
364db383
Commit
364db383
authored
Dec 17, 2019
by
Jan Provaznik
Committed by
Mayra Cabrera
Dec 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed from_username to outgoing_name
* hopefully this makes field name little bit clearer
parent
7b265704
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
0 deletions
+19
-0
changelogs/unreleased/service-desk-name.yml
changelogs/unreleased/service-desk-name.yml
+5
-0
db/migrate/20191213104838_add_service_desk_username.rb
db/migrate/20191213104838_add_service_desk_username.rb
+9
-0
db/schema.rb
db/schema.rb
+1
-0
ee/app/models/service_desk_setting.rb
ee/app/models/service_desk_setting.rb
+1
-0
ee/spec/models/service_desk_setting_spec.rb
ee/spec/models/service_desk_setting_spec.rb
+1
-0
lib/gitlab/import_export/import_export.yml
lib/gitlab/import_export/import_export.yml
+2
-0
No files found.
changelogs/unreleased/service-desk-name.yml
0 → 100644
View file @
364db383
---
title
:
Added migration which adds service desk username column
merge_request
:
21733
author
:
type
:
added
db/migrate/20191213104838_add_service_desk_username.rb
0 → 100644
View file @
364db383
# frozen_string_literal: true
class
AddServiceDeskUsername
<
ActiveRecord
::
Migration
[
5.2
]
DOWNTIME
=
false
def
change
add_column
:service_desk_settings
,
:outgoing_name
,
:string
,
limit:
255
end
end
db/schema.rb
View file @
364db383
...
@@ -3663,6 +3663,7 @@ ActiveRecord::Schema.define(version: 2019_12_17_160632) do
...
@@ -3663,6 +3663,7 @@ ActiveRecord::Schema.define(version: 2019_12_17_160632) do
create_table
"service_desk_settings"
,
primary_key:
"project_id"
,
id: :bigint
,
default:
nil
,
force: :cascade
do
|
t
|
create_table
"service_desk_settings"
,
primary_key:
"project_id"
,
id: :bigint
,
default:
nil
,
force: :cascade
do
|
t
|
t
.
string
"issue_template_key"
,
limit:
255
t
.
string
"issue_template_key"
,
limit:
255
t
.
string
"outgoing_name"
,
limit:
255
end
end
create_table
"services"
,
id: :serial
,
force: :cascade
do
|
t
|
create_table
"services"
,
id: :serial
,
force: :cascade
do
|
t
|
...
...
ee/app/models/service_desk_setting.rb
View file @
364db383
...
@@ -6,6 +6,7 @@ class ServiceDeskSetting < ApplicationRecord
...
@@ -6,6 +6,7 @@ class ServiceDeskSetting < ApplicationRecord
belongs_to
:project
belongs_to
:project
validates
:project_id
,
presence:
true
validates
:project_id
,
presence:
true
validate
:valid_issue_template
validate
:valid_issue_template
validates
:outgoing_name
,
length:
{
maximum:
255
},
allow_blank:
true
def
self
.
update_template_key_for
(
project
:,
issue_template_key
:)
def
self
.
update_template_key_for
(
project
:,
issue_template_key
:)
return
unless
issue_template_key
return
unless
issue_template_key
...
...
ee/spec/models/service_desk_setting_spec.rb
View file @
364db383
...
@@ -5,6 +5,7 @@ require 'spec_helper'
...
@@ -5,6 +5,7 @@ require 'spec_helper'
describe
ServiceDeskSetting
do
describe
ServiceDeskSetting
do
describe
'validations'
do
describe
'validations'
do
it
{
is_expected
.
to
validate_presence_of
(
:project_id
)
}
it
{
is_expected
.
to
validate_presence_of
(
:project_id
)
}
it
{
is_expected
.
to
validate_length_of
(
:outgoing_name
).
is_at_most
(
255
)
}
end
end
describe
'associations'
do
describe
'associations'
do
...
...
lib/gitlab/import_export/import_export.yml
View file @
364db383
...
@@ -220,6 +220,8 @@ excluded_attributes:
...
@@ -220,6 +220,8 @@ excluded_attributes:
-
:encrypted_token
-
:encrypted_token
-
:encrypted_token_iv
-
:encrypted_token_iv
-
:enabled
-
:enabled
service_desk_setting
:
-
:outgoing_name
methods
:
methods
:
notes
:
notes
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment