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
1fc42935
Commit
1fc42935
authored
May 22, 2018
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bring CE-EE parity to app/services/boards/issues/create_service.rb
parent
87aef527
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
13 deletions
+26
-13
app/services/boards/issues/create_service.rb
app/services/boards/issues/create_service.rb
+5
-13
ee/app/services/ee/boards/issues/create_service.rb
ee/app/services/ee/boards/issues/create_service.rb
+21
-0
No files found.
app/services/boards/issues/create_service.rb
View file @
1fc42935
module
Boards
module
Issues
class
CreateService
<
Boards
::
BaseService
prepend
::
EE
::
Boards
::
Issues
::
CreateService
attr_accessor
:project
def
initialize
(
parent
,
project
,
user
,
params
=
{})
...
...
@@ -10,23 +12,13 @@ module Boards
end
def
execute
create_issue
(
creation_params
)
create_issue
(
params
.
merge
(
issue_params
)
)
end
private
def
creation_params
params
.
merge
(
label_ids:
[
list
.
label_id
,
*
board
.
label_ids
],
weight:
board
.
weight
,
milestone_id:
board
.
milestone_id
,
assignee_ids:
assignee_ids
)
end
# This can be safely removed when the board
# receive multiple assignee support.
# See: https://gitlab.com/gitlab-org/gitlab-ee/issues/3786
def
assignee_ids
@assigne_ids
||=
Array
(
board
.
assignee
&
.
id
)
def
issue_params
{
label_ids:
[
list
.
label_id
]
}
end
def
board
...
...
ee/app/services/ee/boards/issues/create_service.rb
0 → 100644
View file @
1fc42935
module
EE
module
Boards
module
Issues
module
CreateService
extend
::
Gitlab
::
Utils
::
Override
override
:issue_params
def
issue_params
{
label_ids:
[
list
.
label_id
,
*
board
.
label_ids
],
weight:
board
.
weight
,
milestone_id:
board
.
milestone_id
,
# This can be removed when boards have multiple assignee support.
# See https://gitlab.com/gitlab-org/gitlab-ee/issues/3786
assignee_ids:
Array
(
board
.
assignee
&
.
id
)
}
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