Milestone doesn't get assigned via API #1949

Closed
opened 2025-11-02 04:18:53 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @jonasfranz on GitHub (Jun 18, 2018).

  • Gitea version (or commit ref): 85414d8
  • Operating system: elementary os / Ubuntu 16.04
  • Database (use [x]):
    • MySQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes
  • Log gist:

Description

If I try to create an issue via the API and I try to assign a milestone in that request it won't be set.

Request:

curl -X POST "https://try.gitea.io/api/v1/repos/JonasFranzDEV/gitea/issues" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{  \"body\": \"Test\",  \"milestone\": 165,  \"title\": \"Test Milestone\"}"

Response:

{
  "id": 1556,
  "url": "https://try.gitea.io/api/v1/repos/JonasFranzDEV/gitea/issues/50",
  "number": 50,
  "user": {
    "id": 1609,
    "login": "JonasFranzDEV",
    "full_name": "",
    "email": "info@jonasfranz.software",
    "avatar_url": "https://try.gitea.io/avatars/a85562fb670c0233a9bf1f61b2c6c4ee",
    "language": "de-DE",
    "username": "JonasFranzDEV"
  },
  "title": "Test Milestone",
  "body": "Test",
  "labels": [],
  "milestone": null,
  "assignee": null,
  "assignees": null,
  "state": "open",
  "comments": 0,
  "created_at": "2018-06-18T13:08:57Z",
  "updated_at": "2018-06-18T13:08:57Z",
  "closed_at": null,
  "due_date": null,
  "pull_request": null
}

milestone is null but should be set.

Originally created by @jonasfranz on GitHub (Jun 18, 2018). - Gitea version (or commit ref): 85414d8 - Operating system: elementary os / Ubuntu 16.04 - Database (use `[x]`): - [x] MySQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes - Log gist: ## Description If I try to create an issue via the API and I try to assign a milestone in that request it won't be set. Request: ```curl curl -X POST "https://try.gitea.io/api/v1/repos/JonasFranzDEV/gitea/issues" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"body\": \"Test\", \"milestone\": 165, \"title\": \"Test Milestone\"}" ``` Response: ```json { "id": 1556, "url": "https://try.gitea.io/api/v1/repos/JonasFranzDEV/gitea/issues/50", "number": 50, "user": { "id": 1609, "login": "JonasFranzDEV", "full_name": "", "email": "info@jonasfranz.software", "avatar_url": "https://try.gitea.io/avatars/a85562fb670c0233a9bf1f61b2c6c4ee", "language": "de-DE", "username": "JonasFranzDEV" }, "title": "Test Milestone", "body": "Test", "labels": [], "milestone": null, "assignee": null, "assignees": null, "state": "open", "comments": 0, "created_at": "2018-06-18T13:08:57Z", "updated_at": "2018-06-18T13:08:57Z", "closed_at": null, "due_date": null, "pull_request": null } ``` `milestone` is `null` but should be set.
GiteaMirror added the type/bugmodifies/api labels 2025-11-02 04:18:53 -06:00
Author
Owner

@johnrazeur commented on GitHub (Jun 18, 2018):

I have no issue on the release/v1.4, but I can reproduce this bug on master.

@johnrazeur commented on GitHub (Jun 18, 2018): I have no issue on the release/v1.4, but I can reproduce this bug on master.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1949