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
4cd0a931
Commit
4cd0a931
authored
Mar 19, 2020
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Publish status page on issue create
parent
f4835bb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
ee/app/services/ee/issues/create_service.rb
ee/app/services/ee/issues/create_service.rb
+7
-0
ee/spec/services/ee/issues/create_service_spec.rb
ee/spec/services/ee/issues/create_service_spec.rb
+17
-0
No files found.
ee/app/services/ee/issues/create_service.rb
View file @
4cd0a931
...
@@ -12,6 +12,13 @@ module EE
...
@@ -12,6 +12,13 @@ module EE
super
super
end
end
override
:after_create
def
after_create
(
issue
)
super
StatusPage
.
trigger_publish
(
project
,
current_user
,
issue
)
end
def
handle_issue_epic_link
(
issue
)
def
handle_issue_epic_link
(
issue
)
return
unless
params
.
key?
(
:epic
)
return
unless
params
.
key?
(
:epic
)
...
...
ee/spec/services/ee/issues/create_service_spec.rb
View file @
4cd0a931
...
@@ -43,5 +43,22 @@ describe Issues::CreateService do
...
@@ -43,5 +43,22 @@ describe Issues::CreateService do
it_behaves_like
'issue with epic_id parameter'
do
it_behaves_like
'issue with epic_id parameter'
do
let
(
:execute
)
{
service
.
execute
}
let
(
:execute
)
{
service
.
execute
}
end
end
describe
'publish to status page'
do
let
(
:execute
)
{
service
.
execute
}
let
(
:issue_id
)
{
execute
&
.
id
}
context
'when creation succeeds'
do
let
(
:params
)
{
{
title:
'New title'
}
}
include_examples
'trigger status page publish'
end
context
'when creation fails'
do
let
(
:params
)
{
{
title:
nil
}
}
include_examples
'no trigger status page publish'
end
end
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