Get latest Sprint ID

Hi

We have created a custom worklog application which currently shows all tasks that have a FixVersion set and are not completed. This way we get a list of things to work on in the current Sprint.

However we would like to adopt the new Agile Board which uses sprint IDs instead.

I have found out that i can easily Query using the JQL and the "[sprint]" column however i need to know which sprint id iam searching for.

How do i get the ID of the latest sprint ?

5 answers

1 accepted

0 votes
Accepted answer

How about using the REST api of GreenHopper /sprints/{rapidViewId}, fetch the list and find which is the latest one?

If you're using Chrome, you can go to the "Work" page for the sprint. Then under the board name where it says "Sprint: Sprint XYZ", right click "Sprint XYZ" and choose "Inspect Element".

This will show you some source that looks like this:

<dd data-sprint-id="2" class="ghx-sprint js-sprintfilter ghx-solo"><a class="ghx-name js-toggle-sprint" role="button">Sprint 13</a><a class="ghx-trigger js-sprint-details" role="button"><span class="ghx-icon ghx-icon-cogdrop"></span></a></dd>

The value for data-sprint-id is your sprint id.

Another tip that may be useful is the JQL query "Sprint in openSprints()".

Someone provided a more efficient method in response to a similar question elsewhere. It's still a bit klunky, but more convenient than reviewing source HTML.

Move from the Work board to the Report Board. Check out the resulting URL string; the Sprint ID is in there. For example, mine looks like this:

https://xxxxx.jira.com/secure/RapidBoard.jspa?rapidView=23&view=reporting&chart=burndownChart&sprint=10</strong<>>

Works like a charm

If you are looking for the current sprint ID 

click "Boards"

select the board you want to get the sprint ID from

open any issue on the boards "Active sprint" page

In the "Agile" section on the issue page right click on the sprint and choose "open link in new tab"

You will see the sprint ID in the url of the new tab

 

To find any sprint ID (for developers):

1. Open the project backlog page

2. Open the browser's dev tools window (for Chrome and Firefox, Command-Option I on macOS)

3. Select the tab "Console" and clear contents of the Console

4. In the backlog page, select Edit Sprint for the desired sprint

In the console pane, about the 5th entry should contain something like this line. Notice sprintId=###

XHR finished loading: GET "https://<company>.atlassian.net/rest/greenhopper/1.0/xboard/plan/sprints/actions?sprintId=109&_=<stuff>".

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Mar 28, 2018 in Jira Software

Can a company’s culture make or break agile adoption?

Can a new-to-agile team survive and thrive in a non-agile culture? If so, what advice would you give to those trying to be agile in a non-agile culture? What's the key(s) to success? Share your thoug...

17,627 views 18 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you