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?
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.