diff --git a/app/controllers/projects/board_issues_controller.rb b/app/controllers/projects/board_issues_controller.rb index 297ad7b2941..aededeb8c0a 100644 --- a/app/controllers/projects/board_issues_controller.rb +++ b/app/controllers/projects/board_issues_controller.rb @@ -14,7 +14,7 @@ class Projects::BoardIssuesController < Projects::ApplicationController only: [:iid, :title, :confidential], include: { assignee: { only: [:id, :name, :username], methods: [:avatar_url] }, - labels: { only: [:id, :title, :color, :priority] } + labels: { only: [:id, :title, :description, :color, :priority] } }) end diff --git a/app/controllers/projects/board_lists_controller.rb b/app/controllers/projects/board_lists_controller.rb index 8491d5733c3..3cfb08d5822 100644 --- a/app/controllers/projects/board_lists_controller.rb +++ b/app/controllers/projects/board_lists_controller.rb @@ -9,7 +9,7 @@ class Projects::BoardListsController < Projects::ApplicationController list = Boards::Lists::CreateService.new(project, current_user, list_params).execute if list.valid? - render json: list.as_json(only: [:id, :list_type, :position], methods: [:title], include: { label: { only: [:id, :title, :color, :priority] } }) + render json: list.as_json(only: [:id, :list_type, :position], methods: [:title], include: { label: { only: [:id, :title, :description, :color, :priority] } }) else render json: list.errors, status: :unprocessable_entity end @@ -39,7 +39,7 @@ class Projects::BoardListsController < Projects::ApplicationController service = Boards::Lists::GenerateService.new(project, current_user) if service.execute - render json: project.board.lists.label.as_json(only: [:id, :list_type, :position], methods: [:title], include: { label: { only: [:id, :title, :color, :priority] } }) + render json: project.board.lists.label.as_json(only: [:id, :list_type, :position], methods: [:title], include: { label: { only: [:id, :title, :description, :color, :priority] } }) else head :unprocessable_entity end diff --git a/app/controllers/projects/boards_controller.rb b/app/controllers/projects/boards_controller.rb index 862d09fee19..052c15f99d0 100644 --- a/app/controllers/projects/boards_controller.rb +++ b/app/controllers/projects/boards_controller.rb @@ -6,7 +6,7 @@ class Projects::BoardsController < Projects::ApplicationController respond_to do |format| format.html - format.json { render json: board.lists.as_json(only: [:id, :list_type, :position], methods: [:title], include: { label: { only: [:id, :title, :color, :priority] } }) } + format.json { render json: board.lists.as_json(only: [:id, :list_type, :position], methods: [:title], include: { label: { only: [:id, :title, :description, :color, :priority] } }) } end end diff --git a/spec/fixtures/api/schemas/issue.json b/spec/fixtures/api/schemas/issue.json index 24bac4fef91..299e4675d6f 100644 --- a/spec/fixtures/api/schemas/issue.json +++ b/spec/fixtures/api/schemas/issue.json @@ -14,6 +14,7 @@ "required": [ "id", "color", + "description", "title", "priority" ], @@ -23,6 +24,7 @@ "type": "string", "pattern": "^#[0-9A-Fa-f]{3}{1,2}+$" }, + "description": { "type": ["string", "null"] }, "title": { "type": "string" }, "priority": { "type": ["integer", "null"] } } diff --git a/spec/fixtures/api/schemas/list.json b/spec/fixtures/api/schemas/list.json index 177754db73a..f070fa3b254 100644 --- a/spec/fixtures/api/schemas/list.json +++ b/spec/fixtures/api/schemas/list.json @@ -17,6 +17,7 @@ "required": [ "id", "color", + "description", "title", "priority" ], @@ -26,6 +27,7 @@ "type": "string", "pattern": "^#[0-9A-Fa-f]{3}{1,2}+$" }, + "description": { "type": ["string", "null"] }, "title": { "type": "string" }, "priority": { "type": ["integer", "null"] } }