Jira Software: How to identify the ID of a sprint
Platform Notice: Cloud, Server, and Data Center - This article applies equally to all platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Sprint ID numbers can be retrieved in a few ways from the Jira User Interface (UI). Sprint ID numbers are useful when performing bulk import/export tasks, actions via the REST API, and SQL queries on Jira DB (Server/Data Center only).
Retrieve sprint ID from Jira issue view
- Open an issue in full screen view
- Hover your mouse pointer over the linked sprint name text in the Sprint field
- Look at the link that pops up in the lower left hand of the screen (Firefox / Chrome)
The sprint ID is the numerical value at the end of the string following "sprintId="
Retrieve sprint ID from JQL search auto-complete
Start searching for the Sprint by its name using JQL Advanced Search. As you enter the sprint name, JQL will provide a dropdown with sprints that match your entered characters. Clicking on one of these options will convert the sprint name to ID in the JQL search bar.
Query sprint ID value from Jira Database via SQL (Server/Data Center only)
If you have access to Jira DB, you can query the AO_60DB71_SPRINT table for Sprint ID values. You can also retrieve the sprint's associated board and filter.
SELECT sp."id" AS sprintID,
sp."name" AS sprintName,
rv."name" AS boardName,
rv."id" AS boardID,
sr.filtername_lower AS filterName,
sr.reqcontent AS filter,
sr.id AS filterID
FROM searchrequest AS sr
JOIN "ao_60db71_rapidview" rv
ON sr.id = rv."saved_filter_id"
JOIN "ao_60db71_sprint" sp
ON sp."rapid_view_id" = rv."id"
ORDER BY sp."NAME";
For example:
jira9121=# SELECT sp."ID" as sprintID, sp."NAME" as sprintName, rv."NAME" as boardName, rv."ID" as boardID, sr.filtername_lower as filterName, sr.reqcontent as filter, sr.ID as filterID FROM searchrequest as sr JOIN "AO_60DB71_RAPIDVIEW" rv ON sr.ID = rv."SAVED_FILTER_ID" JOIN "AO_60DB71_SPRINT" sp on sp."RAPID_VIEW_ID" = rv."ID" ORDER BY sp."NAME";
sprintid | sprintname | boardname | boardid | filtername | filter | filterid
----------+-------------------------+-----------+---------+----------------------+---------------------------------+----------
6 | Sample Sprint 1 | ES board | 3 | filter for es board | project = ES ORDER BY Rank ASC | 10200
4 | Sample Sprint 1 | SP2 board | 2 | filter for sp2 board | project = SP2 ORDER BY Rank ASC | 10100
2 | Sample Sprint 1 | SP board | 1 | filter for sp board | project = SP ORDER BY key desc | 10000
In the above example, we see three sprints with the same name, 'Sample Sprint 1'. Even though the sprints can share the same name, they must be assigned unique ID numbers. They also belong to three different project boards, which can help us select the correct sprint ID for the correct project.