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
91f693c0
Commit
91f693c0
authored
May 05, 2016
by
Long Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update changelog, improve specs
parent
f43044cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
CHANGELOG
CHANGELOG
+1
-1
app/services/issues/move_service.rb
app/services/issues/move_service.rb
+1
-1
spec/services/issues/move_service_spec.rb
spec/services/issues/move_service_spec.rb
+7
-3
No files found.
CHANGELOG
View file @
91f693c0
Please view this file on the master branch, on stable branches it's out of date.
Please view this file on the master branch, on stable branches it's out of date.
v 8.8.0 (unreleased)
v 8.8.0 (unreleased)
- Assign labels and milestone to target project when moving issue. !3934
- Assign labels and milestone to target project when moving issue. !3934
(Long Nguyen)
- Remove future dates from contribution calendar graph.
- Remove future dates from contribution calendar graph.
- Fix error when visiting commit builds page before build was updated
- Fix error when visiting commit builds page before build was updated
- Add 'l' shortcut to open Label dropdown on issuables and 'i' to create new issue on a project
- Add 'l' shortcut to open Label dropdown on issuables and 'i' to create new issue on a project
...
...
app/services/issues/move_service.rb
View file @
91f693c0
...
@@ -46,7 +46,7 @@ module Issues
...
@@ -46,7 +46,7 @@ module Issues
project:
@new_project
,
author:
@old_issue
.
author
,
project:
@new_project
,
author:
@old_issue
.
author
,
description:
rewrite_content
(
@old_issue
.
description
)
}
description:
rewrite_content
(
@old_issue
.
description
)
}
new_params
=
@old_issue
.
serializable_hash
.
merge
(
new_params
)
new_params
=
@old_issue
.
serializable_hash
.
symbolize_keys
.
merge
(
new_params
)
CreateService
.
new
(
@new_project
,
@current_user
,
new_params
).
execute
CreateService
.
new
(
@new_project
,
@current_user
,
new_params
).
execute
end
end
...
...
spec/services/issues/move_service_spec.rb
View file @
91f693c0
...
@@ -7,9 +7,7 @@ describe Issues::MoveService, services: true do
...
@@ -7,9 +7,7 @@ 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!
(
:milestone1
)
do
let
(
:milestone1
)
{
create
(
:milestone
,
project_id:
old_project
.
id
,
title:
'v9.0'
)
}
create
(
:milestone
,
project_id:
old_project
.
id
,
title:
'v9.0'
)
end
let
(
:old_issue
)
do
let
(
:old_issue
)
do
create
(
:issue
,
title:
title
,
description:
description
,
create
(
:issue
,
title:
title
,
description:
description
,
...
@@ -57,6 +55,7 @@ describe Issues::MoveService, services: true do
...
@@ -57,6 +55,7 @@ describe Issues::MoveService, services: true do
it
'assigns milestone to new issue'
do
it
'assigns milestone to new issue'
do
expect
(
new_issue
.
reload
.
milestone
.
title
).
to
eq
'v9.0'
expect
(
new_issue
.
reload
.
milestone
.
title
).
to
eq
'v9.0'
expect
(
new_issue
.
reload
.
milestone
).
to
eq
(
milestone2
)
end
end
it
'assign labels to new issue'
do
it
'assign labels to new issue'
do
...
@@ -64,6 +63,11 @@ describe Issues::MoveService, services: true do
...
@@ -64,6 +63,11 @@ describe Issues::MoveService, services: true do
expect
(
expected_label_titles
).
to
include
'label1'
expect
(
expected_label_titles
).
to
include
'label1'
expect
(
expected_label_titles
).
to
include
'label2'
expect
(
expected_label_titles
).
to
include
'label2'
expect
(
expected_label_titles
.
size
).
to
eq
2
expect
(
expected_label_titles
.
size
).
to
eq
2
new_issue
.
labels
.
each
do
|
label
|
expect
(
new_project
.
labels
).
to
include
(
label
)
expect
(
old_project
.
labels
).
not_to
include
(
label
)
end
end
end
it
'rewrites issue title'
do
it
'rewrites issue title'
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