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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
0b7aabe3
Commit
0b7aabe3
authored
May 05, 2017
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Multiple issue assignee: fix for CE restrictions
parent
7389bb98
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/services/issues/base_service.rb
app/services/issues/base_service.rb
+1
-1
spec/services/issues/update_service_spec.rb
spec/services/issues/update_service_spec.rb
+2
-2
No files found.
app/services/issues/base_service.rb
View file @
0b7aabe3
...
...
@@ -25,7 +25,7 @@ module Issues
return
if
params
[
:assignee_ids
].
blank?
# The number of assignees is limited by one for GitLab CE
params
[
:assignee_ids
]
.
slice!
(
0
,
1
)
params
[
:assignee_ids
]
=
params
[
:assignee_ids
][
0
,
1
]
assignee_ids
=
params
[
:assignee_ids
].
select
{
|
assignee_id
|
assignee_can_read?
(
issuable
,
assignee_id
)
}
...
...
spec/services/issues/update_service_spec.rb
View file @
0b7aabe3
...
...
@@ -40,7 +40,7 @@ describe Issues::UpdateService, services: true do
{
title:
'New title'
,
description:
'Also please fix'
,
assignee_ids:
[
user2
.
id
,
user3
.
id
],
assignee_ids:
[
user2
.
id
],
state_event:
'close'
,
label_ids:
[
label
.
id
],
due_date:
Date
.
tomorrow
...
...
@@ -53,7 +53,7 @@ describe Issues::UpdateService, services: true do
expect
(
issue
).
to
be_valid
expect
(
issue
.
title
).
to
eq
'New title'
expect
(
issue
.
description
).
to
eq
'Also please fix'
expect
(
issue
.
assignees
).
to
match_array
([
user2
,
user3
])
expect
(
issue
.
assignees
).
to
match_array
([
user2
])
expect
(
issue
).
to
be_closed
expect
(
issue
.
labels
).
to
match_array
[
label
]
expect
(
issue
.
due_date
).
to
eq
Date
.
tomorrow
...
...
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