summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJason Colyer <jcolyer@Jasons-MacBook-Pro.local>2019-08-02 14:35:10 -0500
committerJason Colyer <jcolyer@Jasons-MacBook-Pro.local>2019-08-02 14:35:10 -0500
commit87235d009c8d5f40ec0f29575c7af6e91cb0a926 (patch)
tree82cf812f00ac0c8f82416e13f8d86d2e6cfcd5dd /app
parente14265d50d80e96db694f66d6ea3a12b1fdcf943 (diff)
downloadgitlab-ce-87235d009c8d5f40ec0f29575c7af6e91cb0a926.tar.gz
Make issue boards importable
- Added Importable to models/list.rb - Did unless: :importable? on board validation - Created changelog - Modified haml to show issue boards are importable - Added needed spec tests - Modified project.json to include board information - Added relevant models to all_models - Added relevant models to import_export - Added relevant models to safe_model_attributes
Diffstat (limited to 'app')
-rw-r--r--app/models/list.rb3
-rw-r--r--app/views/projects/_export.html.haml1
2 files changed, 3 insertions, 1 deletions
diff --git a/app/models/list.rb b/app/models/list.rb
index d28a9bda82d..ccadd39bda2 100644
--- a/app/models/list.rb
+++ b/app/models/list.rb
@@ -3,10 +3,11 @@
class List < ApplicationRecord
belongs_to :board
belongs_to :label
+ include Importable
enum list_type: { backlog: 0, label: 1, closed: 2, assignee: 3, milestone: 4 }
- validates :board, :list_type, presence: true
+ validates :board, :list_type, presence: true, unless: :importing?
validates :label, :position, presence: true, if: :label?
validates :label_id, uniqueness: { scope: :board_id }, if: :label?
validates :position, numericality: { only_integer: true, greater_than_or_equal_to: 0 }, if: :movable?
diff --git a/app/views/projects/_export.html.haml b/app/views/projects/_export.html.haml
index 1056977886a..d14c5c27b65 100644
--- a/app/views/projects/_export.html.haml
+++ b/app/views/projects/_export.html.haml
@@ -15,6 +15,7 @@
%li= _('Project configuration, including services')
%li= _('Issues with comments, merge requests with diffs and comments, labels, milestones, snippets, and other project entities')
%li= _('LFS objects')
+ %li=_('Issue Boards')
%p= _('The following items will NOT be exported:')
%ul
%li= _('Job traces and artifacts')