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
Tatuya Kamada
gitlab-ce
Commits
4859770e
Commit
4859770e
authored
Jul 15, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/ee-to-ce-import'
parents
d4677353
37d1e65a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
CHANGELOG
CHANGELOG
+1
-0
lib/gitlab/import_export/relation_factory.rb
lib/gitlab/import_export/relation_factory.rb
+6
-2
spec/lib/gitlab/import_export/project.json
spec/lib/gitlab/import_export/project.json
+1
-0
No files found.
CHANGELOG
View file @
4859770e
...
@@ -96,6 +96,7 @@ v 8.10.0 (unreleased)
...
@@ -96,6 +96,7 @@ v 8.10.0 (unreleased)
- Change status color and icon for running builds
- Change status color and icon for running builds
- Fix markdown rendering for: consecutive labels references, label references that begin with a digit or contains `.`
- Fix markdown rendering for: consecutive labels references, label references that begin with a digit or contains `.`
- Fix last update timestamp on issues not preserved on gitlab.com and project imports
- Fix last update timestamp on issues not preserved on gitlab.com and project imports
- Fix issues importing projects from EE to CE
v 8.9.6
v 8.9.6
- Fix importing of events under notes for GitLab projects. !5154
- Fix importing of events under notes for GitLab projects. !5154
...
...
lib/gitlab/import_export/relation_factory.rb
View file @
4859770e
...
@@ -87,7 +87,7 @@ module Gitlab
...
@@ -87,7 +87,7 @@ module Gitlab
project_id
=
@relation_hash
.
delete
(
'project_id'
)
project_id
=
@relation_hash
.
delete
(
'project_id'
)
# project_id may not be part of the export, but we always need to populate it if required.
# project_id may not be part of the export, but we always need to populate it if required.
@relation_hash
[
'project_id'
]
=
project_id
if
relation_class
.
column_names
.
include?
(
'project_id'
)
@relation_hash
[
'project_id'
]
=
project_id
@relation_hash
[
'gl_project_id'
]
=
project_id
if
@relation_hash
[
'gl_project_id'
]
@relation_hash
[
'gl_project_id'
]
=
project_id
if
@relation_hash
[
'gl_project_id'
]
@relation_hash
[
'target_project_id'
]
=
project_id
if
@relation_hash
[
'target_project_id'
]
@relation_hash
[
'target_project_id'
]
=
project_id
if
@relation_hash
[
'target_project_id'
]
@relation_hash
[
'source_project_id'
]
=
-
1
if
@relation_hash
[
'source_project_id'
]
@relation_hash
[
'source_project_id'
]
=
-
1
if
@relation_hash
[
'source_project_id'
]
...
@@ -111,7 +111,7 @@ module Gitlab
...
@@ -111,7 +111,7 @@ module Gitlab
end
end
def
imported_object
def
imported_object
imported_object
=
relation_class
.
new
(
@
relation_hash
)
imported_object
=
relation_class
.
new
(
parsed_
relation_hash
)
yield
(
imported_object
)
if
block_given?
yield
(
imported_object
)
if
block_given?
imported_object
.
importing
=
true
if
imported_object
.
respond_to?
(
:importing
)
imported_object
.
importing
=
true
if
imported_object
.
respond_to?
(
:importing
)
imported_object
imported_object
...
@@ -125,6 +125,10 @@ module Gitlab
...
@@ -125,6 +125,10 @@ module Gitlab
def
admin_user?
def
admin_user?
@user
.
is_admin?
@user
.
is_admin?
end
end
def
parsed_relation_hash
@relation_hash
.
reject
{
|
k
,
_v
|
!
relation_class
.
attribute_method?
(
k
)
}
end
end
end
end
end
end
end
spec/lib/gitlab/import_export/project.json
View file @
4859770e
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
"deleted_at"
:
null
,
"deleted_at"
:
null
,
"due_date"
:
null
,
"due_date"
:
null
,
"moved_to_id"
:
null
,
"moved_to_id"
:
null
,
"test_ee_field"
:
"test"
,
"notes"
:
[
"notes"
:
[
{
{
"id"
:
351
,
"id"
:
351
,
...
...
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