Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Colyer <jcolyer@Jasons-MacBook-Pro.local>2019-08-02 22:35:10 +0300
committerJason Colyer <jcolyer@Jasons-MacBook-Pro.local>2019-08-02 22:35:10 +0300
commit87235d009c8d5f40ec0f29575c7af6e91cb0a926 (patch)
tree82cf812f00ac0c8f82416e13f8d86d2e6cfcd5dd /app/models
parente14265d50d80e96db694f66d6ea3a12b1fdcf943 (diff)
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/models')
-rw-r--r--app/models/list.rb3
1 files changed, 2 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?