I'm currently using the POST method URL https://abc.atlassian.net/rest/api/2/issue to add an issue and sending the following JSON in the body. I'm successfully able to create the bug in the project where I have access.. But, I would like to add this bug into the active sprint. Don't know how and I have tried to check all the documentation but no avail.
Hi @Venkat Mavillapalli -- Welcome to the Atlassian Community!
I believe you would need to get all sprints for the board, and then identify the one with a state that is "active":
https://developer.atlassian.com/cloud/jira/software/rest/api-group-board/#api-rest-agile-1-0-board-boardid-sprint-get
Once you have the sprint id, you can create the issue using the custom field id for sprint in your site to set the value.
Kind regards,Bill
Thanks for your help
This answer helped me, but you don't need to get all sprints, you can query for only the active one
.../rest/agile/1.0/board/{boardNumber}/sprint?state=active
It looks like you're new here. Sign in or register to get started.