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
7424e790
Commit
7424e790
authored
Mar 19, 2020
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Publish status page on issue update
parent
4cd0a931
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
ee/app/services/ee/issues/update_service.rb
ee/app/services/ee/issues/update_service.rb
+2
-0
ee/spec/services/ee/issues/update_service_spec.rb
ee/spec/services/ee/issues/update_service_spec.rb
+30
-0
No files found.
ee/app/services/ee/issues/update_service.rb
View file @
7424e790
...
...
@@ -16,6 +16,8 @@ module EE
Epics
::
UpdateDatesService
.
new
([
issue
.
epic
]).
execute
end
StatusPage
.
trigger_publish
(
project
,
current_user
,
issue
)
if
issue
.
valid?
result
end
...
...
ee/spec/services/ee/issues/update_service_spec.rb
View file @
7424e790
...
...
@@ -185,5 +185,35 @@ describe Issues::UpdateService do
end
end
end
describe
'publish to status page'
do
let
(
:execute
)
{
update_issue
(
params
)
}
let
(
:issue_id
)
{
execute
&
.
id
}
context
'when update succeeds'
do
let
(
:params
)
{
{
title:
'New title'
}
}
include_examples
'trigger status page publish'
end
context
'when closing'
do
let
(
:params
)
{
{
state_event:
'close'
}
}
include_examples
'trigger status page publish'
end
context
'when reopening'
do
let
(
:issue
)
{
create
(
:issue
,
:closed
,
project:
project
)
}
let
(
:params
)
{
{
state_event:
'reopen'
}
}
include_examples
'trigger status page publish'
end
context
'when update fails'
do
let
(
:params
)
{
{
title:
nil
}
}
include_examples
'no trigger status page publish'
end
end
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