Skip to content

Expose noteable_iid in Note

What does this MR do?

Expose noteable_iid in Note

Are there points in the code the reviewer needs to double check?

No

Why was this MR needed?

Since API v4, Issue and MR API are requires iid. But Project Events API and Note API returns only id yet.

Screenshots (if relevant)

Example

$ curl -s --header "PRIVATE-TOKEN wKC3BNr9YpXVx8szS6yg" "http://localhost:3000/api/v4/projects/h5bp%2Fhtml5-boilerplate/events" | jq .[0]
{
  "title": null,
  "project_id": 8,
  "action_name": "commented on",
  "target_id": 1009,
  "target_iid": 1009,
  "target_type": "Note",
  "author_id": 1,
  "data": null,
  "target_title": "iid test",
  "created_at": "2017-08-03T02:53:06.290Z",
  "note": {
    "id": 1009,
    "body": "comment",
    "attachment": null,
    "author": {
      "name": "Administrator",
      "username": "root",
      "id": 1,
      "state": "active",
      "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
      "web_url": "http://localhost:3000/root"
    },
    "created_at": "2017-08-03T02:53:05.791Z",
    "updated_at": "2017-08-03T02:53:05.791Z",
    "system": false,
    "noteable_id": 81,
    "noteable_type": "Issue",
    "noteable_iid": 11
  },
  "author": {
    "name": "Administrator",
    "username": "root",
    "id": 1,
    "state": "active",
    "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
    "web_url": "http://localhost:3000/root"
  },
  "author_username": "root"
}

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

No

Edited by username-removed-125864

Merge request reports