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
f6b9b770
Commit
f6b9b770
authored
Dec 07, 2020
by
Sarah Yasonik
Committed by
Douglas Barbosa Alexandre
Dec 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow alert incident title to include iid for HTTP integrations
parent
f64a7c35
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
22 deletions
+11
-22
ee/app/models/ee/issue.rb
ee/app/models/ee/issue.rb
+0
-1
ee/changelogs/unreleased/sy-update-alert-incident-titles-for-http-integrations.yml
...sy-update-alert-incident-titles-for-http-integrations.yml
+6
-0
ee/spec/models/issue_spec.rb
ee/spec/models/issue_spec.rb
+5
-21
No files found.
ee/app/models/ee/issue.rb
View file @
f6b9b770
...
...
@@ -262,7 +262,6 @@ module EE
def
generic_alert_with_default_title?
title
==
::
Gitlab
::
AlertManagement
::
Payload
::
Generic
::
DEFAULT_TITLE
&&
project
.
alerts_service_activated?
&&
author
==
::
User
.
alert_bot
end
...
...
ee/changelogs/unreleased/sy-update-alert-incident-titles-for-http-integrations.yml
0 → 100644
View file @
f6b9b770
---
title
:
Include issue iid in default title for untitled incidents when created from
alert via HTTP integration
merge_request
:
49274
author
:
type
:
fixed
ee/spec/models/issue_spec.rb
View file @
f6b9b770
...
...
@@ -30,30 +30,14 @@ RSpec.describe Issue do
context
'when issue title is "New: Incident"'
do
let
(
:issue
)
{
build
(
:issue
,
project:
project
,
author:
author
,
title:
'New: Incident'
,
iid:
503503
)
}
context
'when alerts service is active'
do
before
do
allow
(
project
).
to
receive
(
:alerts_service_activated?
).
and_return
(
true
)
end
context
'when the author is Alert Bot'
do
it
'updates issue title with the IID'
do
expect
{
issue
.
save
}.
to
change
{
issue
.
title
}.
to
(
"New: Incident 503503"
)
end
end
context
'when the author is not an Alert Bot'
do
let
(
:author
)
{
create
(
:user
)
}
it
'does not change issue title'
do
expect
{
issue
.
save
}.
not_to
change
{
issue
.
title
}
end
context
'when the author is Alert Bot'
do
it
'updates issue title with the IID'
do
expect
{
issue
.
save
}.
to
change
{
issue
.
title
}.
to
(
"New: Incident 503503"
)
end
end
context
'when alerts service is not active'
do
before
do
allow
(
project
).
to
receive
(
:alerts_service_activated?
).
and_return
(
false
)
end
context
'when the author is not an Alert Bot'
do
let
(
:author
)
{
create
(
:user
)
}
it
'does not change issue title'
do
expect
{
issue
.
save
}.
not_to
change
{
issue
.
title
}
...
...
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