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
Jérome Perrin
gitlab-ce
Commits
f0211a4e
Commit
f0211a4e
authored
Mar 20, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not pass params that are not used in issue move service
parent
a2f25ed6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+1
-1
spec/services/issues/move_service_spec.rb
spec/services/issues/move_service_spec.rb
+1
-2
No files found.
app/controllers/projects/issues_controller.rb
View file @
f0211a4e
...
@@ -92,7 +92,7 @@ class Projects::IssuesController < Projects::ApplicationController
...
@@ -92,7 +92,7 @@ class Projects::IssuesController < Projects::ApplicationController
if
params
[
:move_to_project_id
].
to_i
>
0
if
params
[
:move_to_project_id
].
to_i
>
0
new_project
=
Project
.
find
(
params
[
:move_to_project_id
])
new_project
=
Project
.
find
(
params
[
:move_to_project_id
])
move_service
=
Issues
::
MoveService
.
new
(
project
,
current_user
,
issue_params
)
move_service
=
Issues
::
MoveService
.
new
(
project
,
current_user
)
@issue
=
move_service
.
execute
(
@issue
,
new_project
)
@issue
=
move_service
.
execute
(
@issue
,
new_project
)
end
end
...
...
spec/services/issues/move_service_spec.rb
View file @
f0211a4e
...
@@ -7,7 +7,6 @@ describe Issues::MoveService, services: true do
...
@@ -7,7 +7,6 @@ describe Issues::MoveService, services: true do
let
(
:description
)
{
'Some issue description'
}
let
(
:description
)
{
'Some issue description'
}
let
(
:old_project
)
{
create
(
:project
)
}
let
(
:old_project
)
{
create
(
:project
)
}
let
(
:new_project
)
{
create
(
:project
)
}
let
(
:new_project
)
{
create
(
:project
)
}
let
(
:issue_params
)
{
old_issue
.
serializable_hash
}
let
(
:old_issue
)
do
let
(
:old_issue
)
do
create
(
:issue
,
title:
title
,
description:
description
,
create
(
:issue
,
title:
title
,
description:
description
,
...
@@ -15,7 +14,7 @@ describe Issues::MoveService, services: true do
...
@@ -15,7 +14,7 @@ describe Issues::MoveService, services: true do
end
end
let
(
:move_service
)
do
let
(
:move_service
)
do
described_class
.
new
(
old_project
,
user
,
issue_params
)
described_class
.
new
(
old_project
,
user
)
end
end
shared_context
'user can move issue'
do
shared_context
'user can move issue'
do
...
...
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