Skip to content

Add Note to Todo API Response

What does this MR do and why?

This adds the note which generated a todo item to the Rest API for To-Dos

GraphQL API MR: !89262 (merged)

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

  1. Checkout the branch
  2. Start GDK
  3. Log in to GDK GitLab
  4. make sure you have at least one todo with type directly_adressed or mentioned
  5. visit http://127.0.0.1:3000/api/v4/todos (or whatever host you have in your setup)
  6. verify that the note field is present in todo items with type directly_adressed and mentioned
[
  {
    [...]
    "note": {
      "id": 1134,
      "type": "DiscussionNote",
      "body": "@root Test comment",
      "attachment": null,
      "author": {
        "id": 1,
        "username": "root",
        "name": "Administrator",
        "state": "active",
        "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
        "web_url": "http://127.0.0.1:3000/root"
      },
      "created_at": "2022-06-04T16:32:51.841Z",
      "updated_at": "2022-06-04T16:32:51.841Z",
      "system": false,
      "noteable_id": 50,
      "noteable_type": "Issue",
      "resolvable": false,
      "confidential": false,
      "noteable_iid": 2,
      "commands_changes": {
        
      }
    }
  }
]

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Niklas van Schrick

Merge request reports