Forums

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

Sprint Field: Only show Current Sprint

Jeffrey Bistrong
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.
January 5, 2021

Do anyone know if the Sprint field can somehow be manipulated to only show ONE, current sprint value?

Right now it racks up all the Sprint values as it continues on in its lifespan of not being closed.

 

Obviously, we want to track the sprint history and it's important, but wondering if there is any way to “store” the previous/past/old/non-current sprints in a separate other field while only having the current sprint in the true sprint field or some other solution I might not be thinking of.

 

Slack image.pngCUS ticket.png

3 answers

3 votes
Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 5, 2021

Jeffery,

We did something like what you're asking about by using automation for Jira.

We set up a trigger to run each time the Sprint field is updated we copied the last value of the sprint field to the custom field we created called "Last Sprint".

 

{{issue.sprint.last}}

 

Screen Shot 2021-01-05 at 3.57.06 PM.png

Tom Stoffer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 31, 2021

Out of interest, how do you handle the case where the sprint gets removed? It seems that {{issue.sprint.last}} grabs a random previously assigned sprint. 

1 vote
Laurence Wright June 1, 2022

One way I've found to do this is by using a custom field (Current Sprint in the example below) and automation. I chose to setup the Current Sprint field as a dropdown list but it may be simpler to set it up as a text field.

SprintAuto1.png
The automation is triggered by changes to the sprint value.

Then there's a safety filter to make sure I only do this on project T1.

Next use a smart value to iterate through the list of sprint names in the sprint field. In the example the sprint smart value is set to {{sprint}} and the variable name is set to CurrentSprint.

Note I used similar names for this variable and the custom field - I hope that's not too confusing.

The next step is to check if the sprint state is active. This is done with an advanced compare condition. The first compare value is {{CurrentSprint.state}}, the condition is equals, and the second value is active.

SprintAuto2.png

If that is true, then the next automation step is to edit the value of the custom field Current Sprint. Set it's value to the name of the sprint which is found in the smart value {{CurrentSprint.name}}.

SprintAuto3.png

Finally, to take care of cases where an issue is moved out of the active sprint, then we setup another if JQL which checks that the issue has either an EMPTY value for sprint (which happens when it's moved into the backlog), or the issue is not in opensprints(). We want to set the Current Sprint field to None in this case which is done using another edit issue field step to set the Current Sprint custom field to the value None. 

SprintAuto4.png

There's so many threads from people asking about this I thought I'd try to help with this post. I just got this working but if I find any issues I'll provide an update. 

Note: I've only made this work for single projects having a single active sprint. It may need modifications if there are multiple active sprints in the issue set going into the automation.

Laurence Wright June 2, 2022

I learned that another rule is needed to set the current sprint when a new sprint starts. This can be done using a rule that triggers at sprint start. SprintAuto5.png

Note that it's important to setup the For issues in the sprint branching because the trigger requires it and will error if it's not there.
Last set the sprint name customer field, TCurrentSprint in this example, to the smart value {{Sprint.name}}.

0 votes
Paweł Gajewski August 27, 2021

Maybe it is off topic but i would like to create JQL for issues which are only from current spirnt by value in sprint field. But disregard issues which were unfinished in last sprint and moved to current (where sprint field will have two values of sprint)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events