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
f4450d9b
Commit
f4450d9b
authored
Oct 24, 2019
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use IID instead of issue ID to update title
parent
1487a9f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
ee/app/models/ee/issue.rb
ee/app/models/ee/issue.rb
+1
-1
ee/spec/models/issue_spec.rb
ee/spec/models/issue_spec.rb
+2
-2
No files found.
ee/app/models/ee/issue.rb
View file @
f4450d9b
...
...
@@ -135,7 +135,7 @@ module EE
private
def
update_generic_alert_title_if_applicable
update_
column
(
:title
,
"
#{
title
}
#{
id
}
"
)
if
generic_alert_with_default_title?
update_
attributes
(
title:
"
#{
title
}
#{
i
id
}
"
)
if
generic_alert_with_default_title?
end
def
generic_alert_with_default_title?
...
...
ee/spec/models/issue_spec.rb
View file @
f4450d9b
...
...
@@ -13,7 +13,7 @@ describe Issue do
let
(
:author
)
{
User
.
alert_bot
}
context
'when issue title is "New: Incident"'
do
let
(
:issue
)
{
build
(
:issue
,
project:
project
,
author:
author
,
title:
'New: Incident'
)
}
let
(
:issue
)
{
build
(
:issue
,
project:
project
,
author:
author
,
title:
'New: Incident'
,
iid:
503503
)
}
context
'when alerts service is active'
do
before
do
...
...
@@ -24,7 +24,7 @@ describe Issue do
it
'updates issue title with the IID'
do
issue
.
save
expect
(
issue
.
reload
.
title
).
to
eq
(
"New: Incident
#{
issue
.
id
}
"
)
expect
(
issue
.
reload
.
title
).
to
eq
(
"New: Incident
503503
"
)
end
end
...
...
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