From a8b2d7f380a2d87557e278011fb91044de103d02 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Thu, 4 Aug 2016 13:59:30 -0300 Subject: [PATCH] Return Issue#iid instead of id when listing issues --- app/controllers/projects/board_issues_controller.rb | 2 +- spec/fixtures/api/schemas/issue.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/projects/board_issues_controller.rb b/app/controllers/projects/board_issues_controller.rb index 30bd2559cec..cdaaacfbbd4 100644 --- a/app/controllers/projects/board_issues_controller.rb +++ b/app/controllers/projects/board_issues_controller.rb @@ -7,7 +7,7 @@ class Projects::BoardIssuesController < Projects::ApplicationController issues = Boards::Issues::ListService.new(project, current_user, filter_params).execute issues = issues.page(params[:page]) - render json: issues.as_json(only: [:id, :title, :confidential], include: { labels: { only: [:id, :title, :color] } }) + render json: issues.as_json(only: [:iid, :title, :confidential], include: { labels: { only: [:id, :title, :color] } }) end def update diff --git a/spec/fixtures/api/schemas/issue.json b/spec/fixtures/api/schemas/issue.json index 666e0cdf82c..0a9bf4e0fb7 100644 --- a/spec/fixtures/api/schemas/issue.json +++ b/spec/fixtures/api/schemas/issue.json @@ -1,12 +1,12 @@ { "type": "object", "required" : [ - "id", + "iid", "title", "confidential" ], "properties" : { - "id": { "type": "integer" }, + "iid": { "type": "integer" }, "title": { "type": "string" }, "confidential": { "type": "boolean" }, "labels": {