Associating issue to sprint via Youtrack API

Hello,

Is there a way to associate an issue (during creation or post-creation) to a sprint using Youtrack's API?

i have tried specifying the sprint in the custom fields while creating a ticket, but it does not seem to work:

{
    "project": {
        "id": "0-1"
    },
    "summary": "test",
    "description": "test desc",
    "customFields": [
        {
            "name": "Priority",
            "$type": "SingleEnumIssueCustomField",
            "value": {
                "name": "Normal"
            }
        },
        {
            "name": "Assignee",
            "$type": "SingleUserIssueCustomField",
            "value": {
                "login": "admin"
            }
        },
        {
            "name": "Type",
            "$type": "SingleEnumIssueCustomField",
            "value": {
                "name": "Bug"
            }
        },
        {
            "name": "Pokemons",
            "$type": "MultiEnumIssueCustomField",
            "value": [{
                "name": "Pikachu"
            }]
        },
        {
            "name": "Sprint",
            "$type": "SingleEnumIssueCustomField",
            "value": {
                "id": "180-3"
            }
        }
    ]
}
0
1 comment

Hello Alon 

Please try POSTing the issue's ID to /api/agiles/<agile-board-id>/sprints/<sprint-id>/issues endpoint after the issue is created.

0

Please sign in to leave a comment.