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
32fd25ea
Commit
32fd25ea
authored
Jul 17, 2020
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check system_note flag before creating note
parent
7f2fce29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
app/services/issues/close_service.rb
app/services/issues/close_service.rb
+3
-3
No files found.
app/services/issues/close_service.rb
View file @
32fd25ea
...
...
@@ -33,7 +33,7 @@ module Issues
notification_service
.
async
.
close_issue
(
issue
,
current_user
,
closed_via:
closed_via
)
if
notifications
todo_service
.
close_issue
(
issue
,
current_user
)
resolve_alert
(
issue
)
resolve_alert
(
issue
,
system_note
)
execute_hooks
(
issue
,
'close'
)
invalidate_cache_counts
(
issue
,
users:
issue
.
assignees
)
issue
.
update_project_counter_caches
...
...
@@ -59,11 +59,11 @@ module Issues
SystemNoteService
.
change_status
(
issue
,
issue
.
project
,
current_user
,
issue
.
state
,
current_commit
)
end
def
resolve_alert
(
issue
)
def
resolve_alert
(
issue
,
system_note
)
return
unless
alert
=
issue
.
alert_management_alert
if
alert
.
resolve
SystemNoteService
.
closed_alert_issue
(
alert
,
issue
,
current_user
)
SystemNoteService
.
closed_alert_issue
(
alert
,
issue
,
current_user
)
if
system_note
else
Gitlab
::
AppLogger
.
warn
(
message:
'Cannot resolve an associated Alert Management alert'
,
...
...
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