diff options
author | James Lopez <james@jameslopez.es> | 2016-04-12 16:32:25 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-04-12 16:32:25 +0300 |
commit | 3b99e4ae5bc9e4d1bf54c65bf633ad449361b9df (patch) | |
tree | 9cfd4e638225c43fabfcb9e0aea9a7e87031d4c9 /app/services/projects/import_export | |
parent | 5d642fb7aa666063d5e1761833463bc95241889a (diff) |
add issue and MR comments to default export. Fix spec
Diffstat (limited to 'app/services/projects/import_export')
3 files changed, 7 insertions, 7 deletions
diff --git a/app/services/projects/import_export/import_export.yml b/app/services/projects/import_export/import_export.yml index be7680775ba..c622447ef04 100644 --- a/app/services/projects/import_export/import_export.yml +++ b/app/services/projects/import_export/import_export.yml @@ -1,6 +1,7 @@ # Class relationships to be included in the project import/export :project_tree: - - :issues + - :issues: + - :notes - :labels - :milestones - :snippets @@ -10,6 +11,7 @@ - :user - :merge_requests: - :merge_request_diff + - :notes - :commit_statuses: - :commit diff --git a/app/services/projects/import_export/import_export_reader.rb b/app/services/projects/import_export/import_export_reader.rb index e0617ce851c..001d24af604 100644 --- a/app/services/projects/import_export/import_export_reader.rb +++ b/app/services/projects/import_export/import_export_reader.rb @@ -7,6 +7,10 @@ module Projects { only: atts_only[:project], include: build_hash(tree) } end + def tree + config[:project_tree] + end + private def config @@ -21,10 +25,6 @@ module Projects config[:attributes_except] end - def tree - config[:project_tree] - end - def build_hash(array) array.map do |el| if el.is_a?(Hash) diff --git a/app/services/projects/import_export/project_tree_saver.rb b/app/services/projects/import_export/project_tree_saver.rb index 44d100acd1d..b2ca85bd7c6 100644 --- a/app/services/projects/import_export/project_tree_saver.rb +++ b/app/services/projects/import_export/project_tree_saver.rb @@ -30,8 +30,6 @@ module Projects end def project_json_tree - # TODO confirm children, also add subchildren (i.e comments) - # TODO confirm atts for children @project.to_json(Projects::ImportExport.project_tree) end end |