Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to retrieve all sprints for a project that does not have a board?

Armaan Bajwa May 27, 2019

I have a project TestProject1 with TestBoard scrum board in it. The project has three sprints, Sprint1, Sprint2, and Sprint3. 

I am trying to retrieve all the sprints in my project via REST API, if the board were deleted. Currently, I use the following REST calls to get all the sprints for the project:

http://my-jira-host/rest/agile/1.0/board?projectKeyOrId=TES
 http://my-jira-host/rest/agile/1.0/board/1/sprint

However, if my board gets deleted such that the sprints are not associated with the board anymore, is there another way to retrieve all sprints for the project?

2 answers

1 accepted

0 votes
Answer accepted
Ross McCoy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 27, 2019

Hello @Armaan Bajwa,

My understanding is that sprints do not belong to a project, they belong to a board - so the idea of a project with three sprints isn't accurate, as a sprint may include issues from multiple projects.

Each sprint has an originBoardId property. In essence, sprints are wholly contained within a board, and cannot be separated from the board itself. If you were to delete the board corresponding to this sprint through the usual methods (i.e. through the UI), it would also remove all sprints who have the board as their origin. While it may be theoretically possible to remove a board without removing associated sprints through database wizardry, this is not a situation you want to encounter. 

In short, if you are trying to looking for sprints based on a board that has already been deleted - don't. That's not how sprints and boards work. If you have had some sort of anomalous data loss where you've lost the board but not the sprints, you'd want to consult a solution partner as there is no obvious approach to restoring this data.

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 27, 2019

Hello,

You can iterate over all issues in this project and get all values for the Sprint field.

You should use the search rest endpoint

Suggest an answer

Log in or Sign up to answer