How to assign the bug to the current sprint using JIRA rest api?

Sunil Nagamalla January 13, 2020

I am using below url to create the issue using postman and the issue needs to be created in current sprint.

https://jira.xyz.corp.com/rest/api/2/issue/

Here is the payload

{
"fields": {
"project": {
"key": "TST",
"name": "Test Project"
},
"summary": "Test Project",
"description": "Test Project",
"issuetype": {
"name": "Integration Defect"
},
"priority": {
"name": "High"
},
"customfield_10351": {
"name": "Severity",
"value": "High"
},
"customfield_10653": {
"name": "Test Phase",
"value": "Test Env"
}
}
}

1 answer

0 votes
Fernando Bordallo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 13, 2020

Hello,

You should use the Jira Software Rest Api to add an issue to a sprint. You will avoid all possible problems:

https://developer.atlassian.com/cloud/jira/software/rest/#api-rest-agile-1-0-sprint-sprintId-issue-post

Sunil Nagamalla January 13, 2020

I dont know the sprint id and how to move the issues/bugs to the current sprint. Can you please let me know how to assign the issue to current sprint?

Prashant Chothani July 9, 2020

@Fernando Bordallo Is there a method in the REST API by which we can add the issue to Current Sprint when it is created ? This will be an important addition. We use Bugsnag integration with Jira and able to assign bugs using custom fields. Adding it to the current fields on Top with high priority is an utmost requirement. If there is any current method, could you let us know ? Or else can this FR be added please ?

Suggest an answer

Log in or Sign up to answer