Jira Software: How to identify the ID of a sprint

Still need help?

The Atlassian Community is here for you.

Ask the community

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

  1. Open an issue in full screen view
  2. Hover your mouse pointer over the linked sprint name text in the Sprint field
  3. Look at the link that pops up in the lower left hand of the screen (Firefox / Chrome) 
    screenshot of issue view in Jira. the mouse pointer is hovering over the sprint name value in the sprint field, and the bottom left of the screen indicates the sprint ID value as 1

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. 

animated demonstration of JQL auto-complete for sprint name. once an option is selected from the dropdown, the JQL search changes to display the sprint ID number

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.

PostgreSQL
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:

PostgreSQL
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.


Last modified on Nov 8, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.